@@ -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,15 @@ fn test_v1_splice_in() {
7379 MessageSendEvent :: SendAcceptChannel ,
7480 initiator_node. node. get_our_node_id( )
7581 ) ;
82+ let expected_acceptor_funding_key = "039481c28b904cbe12681e79937373fc76245c1b29871028ae60ba3152162c319b" ;
83+ assert_eq ! ( accept_channel_message. common_fields. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
84+ let expected_acceptor_funding_key =
85+ "039481c28b904cbe12681e79937373fc76245c1b29871028ae60ba3152162c319b" ;
86+ assert_eq ! (
87+ accept_channel_message. common_fields. funding_pubkey. to_string( ) ,
88+ expected_acceptor_funding_key
89+ ) ;
90+
7691 let _res = initiator_node. node . handle_accept_channel (
7792 acceptor_node. node . get_our_node_id ( ) ,
7893 & accept_channel_message. clone ( ) ,
@@ -229,20 +244,28 @@ fn test_v1_splice_in() {
229244 )
230245 . unwrap ( ) ;
231246 // Extract the splice message from node0 to node1
232- let splice_msg = get_event_msg ! (
247+ let splice_init_msg = get_event_msg ! (
233248 initiator_node,
234249 MessageSendEvent :: SendSpliceInit ,
235250 acceptor_node. node. get_our_node_id( )
236251 ) ;
252+ assert_eq ! ( splice_init_msg. funding_contribution_satoshis, splice_in_sats as i64 ) ;
253+ assert_eq ! ( splice_init_msg. funding_feerate_perkw, funding_feerate_perkw) ;
254+ assert_eq ! ( splice_init_msg. funding_pubkey. to_string( ) , expected_initiator_funding_key) ;
255+ assert ! ( splice_init_msg. require_confirmed_inputs. is_none( ) ) ;
237256
238- let _res =
239- acceptor_node. node . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_msg) ;
257+ let _res = acceptor_node
258+ . node
259+ . handle_splice_init ( initiator_node. node . get_our_node_id ( ) , & splice_init_msg) ;
240260 // Extract the splice_ack message from node1 to node0
241261 let splice_ack_msg = get_event_msg ! (
242262 acceptor_node,
243263 MessageSendEvent :: SendSpliceAck ,
244264 initiator_node. node. get_our_node_id( )
245265 ) ;
266+ assert_eq ! ( splice_ack_msg. funding_contribution_satoshis, 0 ) ;
267+ assert_eq ! ( splice_ack_msg. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
268+ assert ! ( splice_ack_msg. require_confirmed_inputs. is_none( ) ) ;
246269
247270 // still pre-splice channel: capacity not updated, channel usable, and funding tx set
248271 assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments