@@ -63,6 +63,12 @@ fn test_v1_splice_in() {
6363 MessageSendEvent :: SendOpenChannel ,
6464 acceptor_node. node. get_our_node_id( )
6565 ) ;
66+ let expected_initiator_funding_key =
67+ "03c21e841cbc0b48197d060c71e116c185fa0ac281b7d0aa5924f535154437ca3b" ;
68+ assert_eq ! (
69+ open_channel_message. common_fields. funding_pubkey. to_string( ) ,
70+ expected_initiator_funding_key
71+ ) ;
6672
6773 let _res = acceptor_node
6874 . node
@@ -73,6 +79,13 @@ fn test_v1_splice_in() {
7379 MessageSendEvent :: SendAcceptChannel ,
7480 initiator_node. node. get_our_node_id( )
7581 ) ;
82+ let expected_acceptor_funding_key =
83+ "039481c28b904cbe12681e79937373fc76245c1b29871028ae60ba3152162c319b" ;
84+ assert_eq ! (
85+ accept_channel_message. common_fields. funding_pubkey. to_string( ) ,
86+ expected_acceptor_funding_key
87+ ) ;
88+
7689 let _res = initiator_node. node . handle_accept_channel (
7790 acceptor_node. node . get_our_node_id ( ) ,
7891 & accept_channel_message. clone ( ) ,
@@ -229,20 +242,28 @@ fn test_v1_splice_in() {
229242 )
230243 . unwrap ( ) ;
231244 // Extract the splice message from node0 to node1
232- let splice_msg = get_event_msg ! (
245+ let splice_init_msg = get_event_msg ! (
233246 initiator_node,
234247 MessageSendEvent :: SendSpliceInit ,
235248 acceptor_node. node. get_our_node_id( )
236249 ) ;
250+ assert_eq ! ( splice_init_msg. funding_contribution_satoshis, splice_in_sats as i64 ) ;
251+ assert_eq ! ( splice_init_msg. funding_feerate_perkw, funding_feerate_perkw) ;
252+ assert_eq ! ( splice_init_msg. funding_pubkey. to_string( ) , expected_initiator_funding_key) ;
253+ assert ! ( splice_init_msg. require_confirmed_inputs. is_none( ) ) ;
237254
238- let _res =
239- acceptor_node. node . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_msg) ;
255+ let _res = acceptor_node
256+ . node
257+ . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_init_msg) ;
240258 // Extract the splice_ack message from node1 to node0
241259 let splice_ack_msg = get_event_msg ! (
242260 acceptor_node,
243261 MessageSendEvent :: SendSpliceAck ,
244262 initiator_node. node. get_our_node_id( )
245263 ) ;
264+ assert_eq ! ( splice_ack_msg. funding_contribution_satoshis, 0 ) ;
265+ assert_eq ! ( splice_ack_msg. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
266+ assert ! ( splice_ack_msg. require_confirmed_inputs. is_none( ) ) ;
246267
247268 // still pre-splice channel: capacity not updated, channel usable, and funding tx set
248269 assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments