@@ -451,7 +451,7 @@ pub struct Splice {
451
451
/// The channel ID where splicing is intended
452
452
pub channel_id : ChannelId ,
453
453
/// The genesis hash of the blockchain where the channel is intended to be spliced
454
- pub chain_hash : BlockHash ,
454
+ pub chain_hash : ChainHash ,
455
455
/// The intended change in channel capacity: the amount to be added (positive value)
456
456
/// or removed (negative value) by the sender (splice initiator) by splicing into/from the channel.
457
457
pub relative_satoshis : i64 ,
@@ -471,7 +471,7 @@ pub struct SpliceAck {
471
471
/// The channel ID where splicing is intended
472
472
pub channel_id : ChannelId ,
473
473
/// The genesis hash of the blockchain where the channel is intended to be spliced
474
- pub chain_hash : BlockHash ,
474
+ pub chain_hash : ChainHash ,
475
475
/// The intended change in channel capacity: the amount to be added (positive value)
476
476
/// or removed (negative value) by the sender (splice acceptor) by splicing into/from the channel.
477
477
pub relative_satoshis : i64 ,
@@ -3445,29 +3445,29 @@ mod tests {
3445
3445
let secp_ctx = Secp256k1 :: new ( ) ;
3446
3446
let ( _, pubkey_1, ) = get_keys_from ! ( "0101010101010101010101010101010101010101010101010101010101010101" , secp_ctx) ;
3447
3447
let splice = msgs:: Splice {
3448
- chain_hash : BlockHash :: from_hex ( "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000" ) . unwrap ( ) ,
3448
+ chain_hash : ChainHash :: from_hex ( "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000" ) . unwrap ( ) ,
3449
3449
channel_id : ChannelId :: from_bytes ( [ 2 ; 32 ] ) ,
3450
3450
relative_satoshis : 123456 ,
3451
3451
funding_feerate_perkw : 2000 ,
3452
3452
locktime : 0 ,
3453
3453
funding_pubkey : pubkey_1,
3454
3454
} ;
3455
3455
let encoded_value = splice. encode ( ) ;
3456
- assert_eq ! ( hex:: encode( encoded_value) , "0202020202020202020202020202020202020202020202020202020202020202000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f000000000001e240000007d000000000031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f " ) ;
3456
+ assert_eq ! ( hex:: encode( encoded_value) , "02020202020202020202020202020202020202020202020202020202020202026fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000000000000001e240000007d000000000031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f " ) ;
3457
3457
}
3458
3458
3459
3459
#[ test]
3460
3460
fn encoding_splice_ack ( ) {
3461
3461
let secp_ctx = Secp256k1 :: new ( ) ;
3462
3462
let ( _, pubkey_1, ) = get_keys_from ! ( "0101010101010101010101010101010101010101010101010101010101010101" , secp_ctx) ;
3463
3463
let splice = msgs:: SpliceAck {
3464
- chain_hash : BlockHash :: from_hex ( "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000" ) . unwrap ( ) ,
3464
+ chain_hash : ChainHash :: from_hex ( "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000" ) . unwrap ( ) ,
3465
3465
channel_id : ChannelId :: from_bytes ( [ 2 ; 32 ] ) ,
3466
3466
relative_satoshis : 123456 ,
3467
3467
funding_pubkey : pubkey_1,
3468
3468
} ;
3469
3469
let encoded_value = splice. encode ( ) ;
3470
- assert_eq ! ( hex:: encode( encoded_value) , "0202020202020202020202020202020202020202020202020202020202020202000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f000000000001e240031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f " ) ;
3470
+ assert_eq ! ( hex:: encode( encoded_value) , "02020202020202020202020202020202020202020202020202020202020202026fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000000000000001e240031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f " ) ;
3471
3471
}
3472
3472
3473
3473
#[ test]
0 commit comments