Skip to content

Commit 7ebf618

Browse files
remove condition for first hop commitment signed dance
1 parent 0e8b785 commit 7ebf618

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lightning/src/ln/functional_test_utils.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,11 +2260,9 @@ fn fail_payment_along_path<'a, 'b, 'c>(expected_path: &[&Node<'a, 'b, 'c>]) {
22602260
prev_node.node.handle_update_fail_htlc(&node.node.get_our_node_id(), &updates.update_fail_htlcs[0]);
22612261
check_added_monitors!(prev_node, 0);
22622262

2263-
if origin_node_id == prev_node.node.get_our_node_id() {
2264-
commitment_signed_dance!(prev_node, node, updates.commitment_signed, false);
2265-
} else {
2266-
commitment_signed_dance!(prev_node, node, updates.commitment_signed, true);
2267-
}
2263+
let is_first_hop = origin_node_id == prev_node.node.get_our_node_id();
2264+
// We do not want to fail backwards on the first hop. All other hops should fail backwards.
2265+
commitment_signed_dance!(prev_node, node, updates.commitment_signed, !is_first_hop);
22682266
}
22692267
}
22702268

0 commit comments

Comments
 (0)