@@ -63,6 +63,8 @@ fn test_v1_splice_in() {
6363 MessageSendEvent :: SendOpenChannel ,
6464 acceptor_node. node. get_our_node_id( )
6565 ) ;
66+ let expected_initiator_funding_key = "03c21e841cbc0b48197d060c71e116c185fa0ac281b7d0aa5924f535154437ca3b" ;
67+ assert_eq ! ( open_channel_message. common_fields. funding_pubkey. to_string( ) , expected_initiator_funding_key) ;
6668
6769 let _res = acceptor_node
6870 . node
@@ -73,6 +75,9 @@ fn test_v1_splice_in() {
7375 MessageSendEvent :: SendAcceptChannel ,
7476 initiator_node. node. get_our_node_id( )
7577 ) ;
78+ let expected_acceptor_funding_key = "039481c28b904cbe12681e79937373fc76245c1b29871028ae60ba3152162c319b" ;
79+ assert_eq ! ( accept_channel_message. common_fields. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
80+
7681 let _res = initiator_node. node . handle_accept_channel (
7782 acceptor_node. node . get_our_node_id ( ) ,
7883 & accept_channel_message. clone ( ) ,
@@ -229,20 +234,27 @@ fn test_v1_splice_in() {
229234 )
230235 . unwrap ( ) ;
231236 // Extract the splice message from node0 to node1
232- let splice_msg = get_event_msg ! (
237+ let splice_init_msg = get_event_msg ! (
233238 initiator_node,
234239 MessageSendEvent :: SendSpliceInit ,
235240 acceptor_node. node. get_our_node_id( )
236241 ) ;
242+ assert_eq ! ( splice_init_msg. funding_contribution_satoshis, splice_in_sats as i64 ) ;
243+ assert_eq ! ( splice_init_msg. funding_feerate_perkw, funding_feerate_perkw) ;
244+ assert_eq ! ( splice_init_msg. funding_pubkey. to_string( ) , expected_initiator_funding_key) ;
245+ assert ! ( splice_init_msg. require_confirmed_inputs. is_none( ) ) ;
237246
238247 let _res =
239- acceptor_node. node . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_msg ) ;
248+ acceptor_node. node . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_init_msg ) ;
240249 // Extract the splice_ack message from node1 to node0
241250 let splice_ack_msg = get_event_msg ! (
242251 acceptor_node,
243252 MessageSendEvent :: SendSpliceAck ,
244253 initiator_node. node. get_our_node_id( )
245254 ) ;
255+ assert_eq ! ( splice_ack_msg. funding_contribution_satoshis, 0 ) ;
256+ assert_eq ! ( splice_ack_msg. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
257+ assert ! ( splice_ack_msg. require_confirmed_inputs. is_none( ) ) ;
246258
247259 // still pre-splice channel: capacity not updated, channel usable, and funding tx set
248260 assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments