@@ -63,6 +63,12 @@ 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 =
67
+ "03c21e841cbc0b48197d060c71e116c185fa0ac281b7d0aa5924f535154437ca3b" ;
68
+ assert_eq ! (
69
+ open_channel_message. common_fields. funding_pubkey. to_string( ) ,
70
+ expected_initiator_funding_key
71
+ ) ;
66
72
67
73
let _res = acceptor_node
68
74
. node
@@ -73,6 +79,13 @@ fn test_v1_splice_in() {
73
79
MessageSendEvent :: SendAcceptChannel ,
74
80
initiator_node. node. get_our_node_id( )
75
81
) ;
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
+
76
89
let _res = initiator_node. node . handle_accept_channel (
77
90
acceptor_node. node . get_our_node_id ( ) ,
78
91
& accept_channel_message. clone ( ) ,
@@ -229,20 +242,28 @@ fn test_v1_splice_in() {
229
242
)
230
243
. unwrap ( ) ;
231
244
// Extract the splice message from node0 to node1
232
- let splice_msg = get_event_msg ! (
245
+ let splice_init_msg = get_event_msg ! (
233
246
initiator_node,
234
247
MessageSendEvent :: SendSpliceInit ,
235
248
acceptor_node. node. get_our_node_id( )
236
249
) ;
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( ) ) ;
237
254
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) ;
240
258
// Extract the splice_ack message from node1 to node0
241
259
let splice_ack_msg = get_event_msg ! (
242
260
acceptor_node,
243
261
MessageSendEvent :: SendSpliceAck ,
244
262
initiator_node. node. get_our_node_id( )
245
263
) ;
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( ) ) ;
246
267
247
268
// still pre-splice channel: capacity not updated, channel usable, and funding tx set
248
269
assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments