@@ -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,15 @@ 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 = "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
+
76
91
let _res = initiator_node. node . handle_accept_channel (
77
92
acceptor_node. node . get_our_node_id ( ) ,
78
93
& accept_channel_message. clone ( ) ,
@@ -229,20 +244,28 @@ fn test_v1_splice_in() {
229
244
)
230
245
. unwrap ( ) ;
231
246
// Extract the splice message from node0 to node1
232
- let splice_msg = get_event_msg ! (
247
+ let splice_init_msg = get_event_msg ! (
233
248
initiator_node,
234
249
MessageSendEvent :: SendSpliceInit ,
235
250
acceptor_node. node. get_our_node_id( )
236
251
) ;
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( ) ) ;
237
256
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) ;
240
260
// Extract the splice_ack message from node1 to node0
241
261
let splice_ack_msg = get_event_msg ! (
242
262
acceptor_node,
243
263
MessageSendEvent :: SendSpliceAck ,
244
264
initiator_node. node. get_our_node_id( )
245
265
) ;
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( ) ) ;
246
269
247
270
// still pre-splice channel: capacity not updated, channel usable, and funding tx set
248
271
assert_eq ! ( acceptor_node. node. list_channels( ) . len( ) , 1 ) ;
0 commit comments