@@ -1010,7 +1010,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1010
1010
"bitcoin::blockdata::transaction::OutPoint" => Some ( "crate::lightning::chain::transaction::OutPoint" ) ,
1011
1011
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( "crate::c_types::Transaction" ) ,
1012
1012
"bitcoin::Witness" => Some ( "crate::c_types::Witness" ) ,
1013
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( "crate::c_types::TxOut" ) ,
1013
+ "bitcoin::TxOut" | "bitcoin:: blockdata::transaction::TxOut" if !is_ref => Some ( "crate::c_types::TxOut" ) ,
1014
1014
"bitcoin::network::constants::Network" => Some ( "crate::bitcoin::network::Network" ) ,
1015
1015
"bitcoin::util::address::WitnessVersion" => Some ( "crate::c_types::WitnessVersion" ) ,
1016
1016
"bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "*const [u8; 80]" ) ,
@@ -1022,9 +1022,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1022
1022
if is_ref => Some ( "*const [u8; 32]" ) ,
1023
1023
1024
1024
// Newtypes that we just expose in their original form.
1025
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1025
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1026
1026
if is_ref => Some ( "*const [u8; 32]" ) ,
1027
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1027
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1028
1028
if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1029
1029
"bitcoin::secp256k1::Message" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes" ) ,
1030
1030
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
@@ -1105,7 +1105,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1105
1105
"bitcoin::Witness" if is_ref => Some ( "&" ) ,
1106
1106
"bitcoin::Witness" => Some ( "" ) ,
1107
1107
"bitcoin::blockdata::transaction::OutPoint" => Some ( "crate::c_types::C_to_bitcoin_outpoint(" ) ,
1108
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( "" ) ,
1108
+ "bitcoin::TxOut" | "bitcoin:: blockdata::transaction::TxOut" if !is_ref => Some ( "" ) ,
1109
1109
"bitcoin::network::constants::Network" => Some ( "" ) ,
1110
1110
"bitcoin::util::address::WitnessVersion" => Some ( "" ) ,
1111
1111
"bitcoin::blockdata::block::BlockHeader" => Some ( "&::bitcoin::consensus::encode::deserialize(unsafe { &*" ) ,
@@ -1123,7 +1123,8 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1123
1123
// Newtypes that we just expose in their original form.
1124
1124
"bitcoin::hash_types::Txid" if is_ref => Some ( "&::bitcoin::hash_types::Txid::from_slice(&unsafe { &*" ) ,
1125
1125
"bitcoin::hash_types::Txid" if !is_ref => Some ( "::bitcoin::hash_types::Txid::from_slice(&" ) ,
1126
- "bitcoin::hash_types::BlockHash" => Some ( "::bitcoin::hash_types::BlockHash::from_slice(&" ) ,
1126
+ "bitcoin::hash_types::BlockHash" |"bitcoin::BlockHash" => Some ( "::bitcoin::hash_types::BlockHash::from_slice(&" ) ,
1127
+ "bitcoin::blockdata::constants::ChainHash" => Some ( "::bitcoin::blockdata::constants::ChainHash::from_slice(&" ) ,
1127
1128
"lightning::ln::PaymentHash" if !is_ref => Some ( "::lightning::ln::PaymentHash(" ) ,
1128
1129
"lightning::ln::PaymentHash" if is_ref => Some ( "&::lightning::ln::PaymentHash(unsafe { *" ) ,
1129
1130
"lightning::ln::PaymentPreimage" if !is_ref => Some ( "::lightning::ln::PaymentPreimage(" ) ,
@@ -1196,7 +1197,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1196
1197
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( ".into_bitcoin()" ) ,
1197
1198
"bitcoin::Witness" => Some ( ".into_bitcoin()" ) ,
1198
1199
"bitcoin::blockdata::transaction::OutPoint" => Some ( ")" ) ,
1199
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( ".into_rust()" ) ,
1200
+ "bitcoin::TxOut" | "bitcoin:: blockdata::transaction::TxOut" if !is_ref => Some ( ".into_rust()" ) ,
1200
1201
"bitcoin::network::constants::Network" => Some ( ".into_bitcoin()" ) ,
1201
1202
"bitcoin::util::address::WitnessVersion" => Some ( ".into()" ) ,
1202
1203
"bitcoin::blockdata::block::BlockHeader" => Some ( " }).unwrap()" ) ,
@@ -1209,7 +1210,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1209
1210
// Newtypes that we just expose in their original form.
1210
1211
"bitcoin::hash_types::Txid" if is_ref => Some ( " }[..]).unwrap()" ) ,
1211
1212
"bitcoin::hash_types::Txid" => Some ( ".data[..]).unwrap()" ) ,
1212
- "bitcoin::hash_types::BlockHash" if !is_ref => Some ( ".data[..]).unwrap()" ) ,
1213
+ "bitcoin::hash_types::BlockHash" | "bitcoin::BlockHash" | "bitcoin::blockdata::constants::ChainHash" if !is_ref => Some ( ".data[..]).unwrap()" ) ,
1213
1214
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
1214
1215
|"lightning::ln::channelmanager::PaymentId" |"lightning::ln::channelmanager::InterceptId"
1215
1216
|"lightning::chain::keysinterface::KeyMaterial"
@@ -1299,7 +1300,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1299
1300
"bitcoin::Witness" if is_ref => Some ( "crate::c_types::Witness::from_bitcoin(" ) ,
1300
1301
"bitcoin::Witness" if !is_ref => Some ( "crate::c_types::Witness::from_bitcoin(&" ) ,
1301
1302
"bitcoin::blockdata::transaction::OutPoint" => Some ( "crate::c_types::bitcoin_to_C_outpoint(" ) ,
1302
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( "crate::c_types::TxOut::from_rust(" ) ,
1303
+ "bitcoin::TxOut" | "bitcoin:: blockdata::transaction::TxOut" if !is_ref => Some ( "crate::c_types::TxOut::from_rust(" ) ,
1303
1304
"bitcoin::network::constants::Network" => Some ( "crate::bitcoin::network::Network::from_bitcoin(" ) ,
1304
1305
"bitcoin::util::address::WitnessVersion" => Some ( "" ) ,
1305
1306
"bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "&local_" ) ,
@@ -1308,9 +1309,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1308
1309
"bitcoin::hash_types::Txid" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1309
1310
1310
1311
// Newtypes that we just expose in their original form.
1311
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1312
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1312
1313
if is_ref => Some ( "" ) ,
1313
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1314
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1314
1315
if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1315
1316
"bitcoin::secp256k1::Message" if !is_ref => Some ( "crate::c_types::ThirtyTwoBytes { data: " ) ,
1316
1317
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
@@ -1383,7 +1384,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1383
1384
"bitcoin::blockdata::transaction::Transaction" |"bitcoin::Transaction" => Some ( ")" ) ,
1384
1385
"bitcoin::Witness" => Some ( ")" ) ,
1385
1386
"bitcoin::blockdata::transaction::OutPoint" => Some ( ")" ) ,
1386
- "bitcoin::blockdata::transaction::TxOut" if !is_ref => Some ( ")" ) ,
1387
+ "bitcoin::TxOut" | "bitcoin:: blockdata::transaction::TxOut" if !is_ref => Some ( ")" ) ,
1387
1388
"bitcoin::network::constants::Network" => Some ( ")" ) ,
1388
1389
"bitcoin::util::address::WitnessVersion" => Some ( ".into()" ) ,
1389
1390
"bitcoin::blockdata::block::BlockHeader" if is_ref => Some ( "" ) ,
@@ -1392,9 +1393,9 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1392
1393
"bitcoin::hash_types::Txid" if !is_ref => Some ( ".into_inner() }" ) ,
1393
1394
1394
1395
// Newtypes that we just expose in their original form.
1395
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1396
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1396
1397
if is_ref => Some ( ".as_inner()" ) ,
1397
- "bitcoin::hash_types::Txid" |"bitcoin::hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash"
1398
+ "bitcoin::hash_types::Txid" |"bitcoin::BlockHash" | "bitcoin:: hash_types::BlockHash" |"bitcoin_hashes::sha256::Hash" | "bitcoin::blockdata::constants::ChainHash "
1398
1399
if !is_ref => Some ( ".into_inner() }" ) ,
1399
1400
"bitcoin::secp256k1::Message" if !is_ref => Some ( ".as_ref().clone() }" ) ,
1400
1401
"lightning::ln::PaymentHash" |"lightning::ln::PaymentPreimage" |"lightning::ln::PaymentSecret"
@@ -1498,7 +1499,7 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> {
1498
1499
"lightning::ln::PaymentHash" => true ,
1499
1500
"lightning::ln::PaymentPreimage" => true ,
1500
1501
"lightning::ln::channelmanager::PaymentId" => true ,
1501
- "bitcoin::hash_types::BlockHash" => true ,
1502
+ "bitcoin::hash_types::BlockHash" | "bitcoin::BlockHash" => true ,
1502
1503
"secp256k1::PublicKey" |"bitcoin::secp256k1::PublicKey" => true ,
1503
1504
_ => false ,
1504
1505
}
0 commit comments