@@ -1083,13 +1083,9 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger + MaybeSend + MaybeSync>
10831083 value: Amount :: from_sat( splice_out_sats) ,
10841084 script_pubkey: wallet. get_change_script( ) . unwrap( ) ,
10851085 } ] ;
1086- let wallet_sync = WalletSync :: new ( & wallet, Arc :: clone ( & logger) ) ;
1087- if let Ok ( contribution) = funding_template. splice_out_sync (
1088- outputs,
1089- feerate,
1090- FeeRate :: MAX ,
1091- & wallet_sync,
1092- ) {
1086+ if let Ok ( contribution) =
1087+ funding_template. splice_out ( outputs, feerate, FeeRate :: MAX )
1088+ {
10931089 let _ = channelmanager. funding_contributed (
10941090 & chan_id,
10951091 & counterparty,
@@ -1890,8 +1886,8 @@ fn splice_seed() -> Vec<u8> {
18901886 // CommitmentSigned message with proper signature (r=f7, s=01...) and funding_txid TLV
18911887 // signature r encodes sighash first byte f7, s follows the pattern from funding_created
18921888 // TLV type 1 (odd/optional) for funding_txid as per impl_writeable_msg!(CommitmentSigned, ...)
1893- // Note: txid is encoded in reverse byte order (Bitcoin standard), so to get display 0000...0033 , encode 3300 ...0000
1894- ext_from_hex ( "0084 c000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000f7 0100000000000000000000000000000000000000000000000000000000000000 0000 01 20 3300000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
1889+ // Note: txid is encoded in reverse byte order (Bitcoin standard), so to get display 0000...0031 , encode 3100 ...0000
1890+ ext_from_hex ( "0084 c000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000f7 0100000000000000000000000000000000000000000000000000000000000000 0000 01 20 3100000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
18951891
18961892 // After commitment_signed exchange, we need to exchange tx_signatures.
18971893 // Message type IDs: TxSignatures = 71 (0x0047)
@@ -1904,19 +1900,19 @@ fn splice_seed() -> Vec<u8> {
19041900 // inbound read from peer id 0 of len 150 (134 message + 16 MAC)
19051901 ext_from_hex ( "030096" , & mut test) ;
19061902 // TxSignatures message with shared_input_signature TLV (type 0)
1907- // txid must match the splice funding txid (0x33 in reverse byte order)
1903+ // txid must match the splice funding txid (0x31 in reverse byte order)
19081904 // shared_input_signature: 64-byte fuzz signature for the shared input
1909- ext_from_hex ( "0047 c000000000000000000000000000000000000000000000000000000000000000 3300000000000000000000000000000000000000000000000000000000000000 0000 00 40 00000000000000000000000000000000000000000000000000000000000000dc 0100000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
1905+ ext_from_hex ( "0047 c000000000000000000000000000000000000000000000000000000000000000 3100000000000000000000000000000000000000000000000000000000000000 0000 00 40 00000000000000000000000000000000000000000000000000000000000000dc 0100000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
19101906
19111907 // Connect a block with the splice funding transaction to confirm it
19121908 // The splice funding tx: version(4) + input_count(1) + txid(32) + vout(4) + script_len(1) + sequence(4)
19131909 // + output_count(1) + value(8) + script_len(1) + script(34) + locktime(4) = 94 bytes = 0x5e
19141910 // Transaction structure from FundingTransactionReadyForSigning:
19151911 // - Input: spending c000...00:0 with sequence 0xfffffffd
1916- // - Output: 115536 sats to OP_0 PUSH32 6e00...00
1912+ // - Output: 115538 sats to OP_0 PUSH32 6e00...00
19171913 // - Locktime: 13
19181914 ext_from_hex ( "0c005e" , & mut test) ;
1919- ext_from_hex ( "02000000 01 c000000000000000000000000000000000000000000000000000000000000000 00000000 00 fdffffff 01 50c3010000000000 22 00206e00000000000000000000000000000000000000000000000000000000000000 0d000000" , & mut test) ;
1915+ ext_from_hex ( "02000000 01 c000000000000000000000000000000000000000000000000000000000000000 00000000 00 fdffffff 01 52c3010000000000 22 00206e00000000000000000000000000000000000000000000000000000000000000 0d000000" , & mut test) ;
19201916
19211917 // Connect additional blocks to reach minimum_depth confirmations
19221918 for _ in 0 ..5 {
@@ -1933,8 +1929,8 @@ fn splice_seed() -> Vec<u8> {
19331929 // inbound read from peer id 0 of len 82 (66 message + 16 MAC)
19341930 ext_from_hex ( "030052" , & mut test) ;
19351931 // SpliceLocked message (type 77 = 0x004d): channel_id + splice_txid + mac
1936- // splice_txid must match the splice funding txid (0x33 in reverse byte order)
1937- ext_from_hex ( "004d c000000000000000000000000000000000000000000000000000000000000000 3300000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
1932+ // splice_txid must match the splice funding txid (0x31 in reverse byte order)
1933+ ext_from_hex ( "004d c000000000000000000000000000000000000000000000000000000000000000 3100000000000000000000000000000000000000000000000000000000000000 03000000000000000000000000000000" , & mut test) ;
19381934
19391935 test
19401936}
@@ -2064,6 +2060,6 @@ mod tests {
20642060
20652061 // Splice locked
20662062 assert_eq ! ( log_entries. get( & ( "lightning::ln::peer_handler" . to_string( ) , "Handling SendSpliceLocked event in peer_handler for node 030000000000000000000000000000000000000000000000000000000000000002 for channel c000000000000000000000000000000000000000000000000000000000000000" . to_string( ) ) ) , Some ( & 1 ) ) ;
2067- assert_eq ! ( log_entries. get( & ( "lightning::ln::channel" . to_string( ) , "Promoting splice funding txid 0000000000000000000000000000000000000000000000000000000000000033 " . to_string( ) ) ) , Some ( & 1 ) ) ;
2063+ assert_eq ! ( log_entries. get( & ( "lightning::ln::channel" . to_string( ) , "Promoting splice funding txid 0000000000000000000000000000000000000000000000000000000000000031 " . to_string( ) ) ) , Some ( & 1 ) ) ;
20682064 }
20692065}
0 commit comments