Skip to content

Commit 1dc190d

Browse files
committed
Remove let binding for unit values in splice test
1 parent 1bda3eb commit 1dc190d

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

lightning/src/ln/splicing_tests.rs

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn test_v1_splice_in() {
7979
};
8080

8181
// Initiate splice-in
82-
let _res = initiator_node
82+
initiator_node
8383
.node
8484
.splice_channel(
8585
&channel_id,
@@ -104,9 +104,7 @@ fn test_v1_splice_in() {
104104
assert_eq!(splice_init_msg.funding_pubkey.to_string(), expected_initiator_funding_key);
105105
assert!(splice_init_msg.require_confirmed_inputs.is_none());
106106

107-
let _res = acceptor_node
108-
.node
109-
.handle_splice_init(initiator_node.node.get_our_node_id(), &splice_init_msg);
107+
acceptor_node.node.handle_splice_init(initiator_node.node.get_our_node_id(), &splice_init_msg);
110108
// Extract the splice_ack message
111109
let splice_ack_msg = get_event_msg!(
112110
acceptor_node,
@@ -130,9 +128,7 @@ fn test_v1_splice_in() {
130128
assert!(channel.confirmations.unwrap() > 0);
131129
}
132130

133-
let _res = initiator_node
134-
.node
135-
.handle_splice_ack(acceptor_node.node.get_our_node_id(), &splice_ack_msg);
131+
initiator_node.node.handle_splice_ack(acceptor_node.node.get_our_node_id(), &splice_ack_msg);
136132

137133
// still pre-splice channel: capacity not updated, channel usable, and funding tx set
138134
assert_eq!(initiator_node.node.list_channels().len(), 1);
@@ -176,7 +172,7 @@ fn test_v1_splice_in() {
176172
assert_eq!(tx_add_input_msg.shared_input_txid, None);
177173
}
178174

179-
let _res = acceptor_node
175+
acceptor_node
180176
.node
181177
.handle_tx_add_input(initiator_node.node.get_our_node_id(), &tx_add_input_msg);
182178
let tx_complete_msg = get_event_msg!(
@@ -185,9 +181,7 @@ fn test_v1_splice_in() {
185181
initiator_node.node.get_our_node_id()
186182
);
187183

188-
let _res = initiator_node
189-
.node
190-
.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
184+
initiator_node.node.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
191185
// Second input
192186
let tx_add_input2_msg = get_event_msg!(
193187
&initiator_node,
@@ -211,7 +205,7 @@ fn test_v1_splice_in() {
211205
);
212206
}
213207

214-
let _res = acceptor_node
208+
acceptor_node
215209
.node
216210
.handle_tx_add_input(initiator_node.node.get_our_node_id(), &tx_add_input2_msg);
217211
let tx_complete_msg = get_event_msg!(
@@ -220,9 +214,7 @@ fn test_v1_splice_in() {
220214
initiator_node.node.get_our_node_id()
221215
);
222216

223-
let _res = initiator_node
224-
.node
225-
.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
217+
initiator_node.node.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
226218

227219
// TxAddOutput for the change output
228220
let tx_add_output_msg = get_event_msg!(
@@ -238,7 +230,7 @@ fn test_v1_splice_in() {
238230
assert_eq!(tx_add_output_msg.sats, 13979); // extra_splice_funding_input_sats - splice_in_sats
239231
}
240232

241-
let _res = acceptor_node
233+
acceptor_node
242234
.node
243235
.handle_tx_add_output(initiator_node.node.get_our_node_id(), &tx_add_output_msg);
244236
let tx_complete_msg = get_event_msg!(
@@ -247,9 +239,7 @@ fn test_v1_splice_in() {
247239
initiator_node.node.get_our_node_id()
248240
);
249241

250-
let _res = initiator_node
251-
.node
252-
.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
242+
initiator_node.node.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
253243
// TxAddOutput for the splice funding
254244
let tx_add_output2_msg = get_event_msg!(
255245
&initiator_node,
@@ -264,7 +254,7 @@ fn test_v1_splice_in() {
264254
assert_eq!(tx_add_output2_msg.sats, post_splice_channel_value);
265255
}
266256

267-
let _res = acceptor_node
257+
acceptor_node
268258
.node
269259
.handle_tx_add_output(initiator_node.node.get_our_node_id(), &tx_add_output2_msg);
270260
let _tx_complete_msg = get_event_msg!(
@@ -274,9 +264,7 @@ fn test_v1_splice_in() {
274264
);
275265

276266
// TODO(splicing) This is the last tx_complete, which triggers the commitment flow, which is not yet fully implemented
277-
let _res = initiator_node
278-
.node
279-
.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
267+
initiator_node.node.handle_tx_complete(acceptor_node.node.get_our_node_id(), &tx_complete_msg);
280268
let events = initiator_node.node.get_and_clear_pending_msg_events();
281269
assert_eq!(events.len(), 1);
282270
match events[0] {

0 commit comments

Comments
 (0)