@@ -63,6 +63,8 @@ fn test_v1_splice_in() {
63
63
MessageSendEvent :: SendOpenChannel ,
64
64
acceptor_node. node. get_our_node_id( )
65
65
) ;
66
+ let expected_initiator_funding_key = "03c21e841cbc0b48197d060c71e116c185fa0ac281b7d0aa5924f535154437ca3b" ;
67
+ assert_eq ! ( open_channel_message. common_fields. funding_pubkey. to_string( ) , expected_initiator_funding_key) ;
66
68
67
69
let _res = acceptor_node
68
70
. node
@@ -73,6 +75,9 @@ fn test_v1_splice_in() {
73
75
MessageSendEvent :: SendAcceptChannel ,
74
76
initiator_node. node. get_our_node_id( )
75
77
) ;
78
+ let expected_acceptor_funding_key = "039481c28b904cbe12681e79937373fc76245c1b29871028ae60ba3152162c319b" ;
79
+ assert_eq ! ( accept_channel_message. common_fields. funding_pubkey. to_string( ) , expected_acceptor_funding_key) ;
80
+
76
81
let _res = initiator_node. node . handle_accept_channel (
77
82
acceptor_node. node . get_our_node_id ( ) ,
78
83
& accept_channel_message. clone ( ) ,
@@ -229,20 +234,27 @@ fn test_v1_splice_in() {
229
234
)
230
235
. unwrap ( ) ;
231
236
// Extract the splice message from node0 to node1
232
- let splice_msg = get_event_msg ! (
237
+ let splice_init_msg = get_event_msg ! (
233
238
initiator_node,
234
239
MessageSendEvent :: SendSpliceInit ,
235
240
acceptor_node. node. get_our_node_id( )
236
241
) ;
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( ) ) ;
237
246
238
247
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 ) ;
240
249
// Extract the splice_ack message from node1 to node0
241
250
let splice_ack_msg = get_event_msg ! (
242
251
acceptor_node,
243
252
MessageSendEvent :: SendSpliceAck ,
244
253
initiator_node. node. get_our_node_id( )
245
254
) ;
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( ) ) ;
246
258
247
259
// still pre-splice channel: capacity not updated, channel usable, and funding tx set
248
260
assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments