Remove `do_main_commitment_signed_dance` call in macro
What changed, and why it matters
This commit removes an unused branch of a Rust macro used only in test helper code. It is a code cleanup change with no apparent effect on production Lightning node behavior or security.
No security action required. Treat as routine test-code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes one pattern arm of the commitment_signed_dance! macro in lightning/src/ln/functional_test_utils.rs. The removed arm called do_main_commitment_signed_dance with a () placeholder and three true flags. The remaining macro arms still handle real commitment_signed messages. No production code paths are modified, and no security vulnerability is described or evident in the diff.
Changed components
lightning/src/ln/functional_test_utils.rsInspect captured patch +0 / −7
diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs
index be62a00..8c786de 100644
--- a/lightning/src/ln/functional_test_utils.rs
+++ b/lightning/src/ln/functional_test_utils.rs
@@ -2644,13 +2644,6 @@ pub fn expect_htlc_forwarding_fails(
/// Performs the "commitment signed dance" - the series of message exchanges which occur after a
/// commitment update.
macro_rules! commitment_signed_dance {
- ($node_a: expr, $node_b: expr, (), $fail_backwards: expr, true /* skip last step */, true /* return extra message */, true /* return last RAA */) => {
- $crate::ln::functional_test_utils::do_main_commitment_signed_dance(
- &$node_a,
- &$node_b,
- $fail_backwards,
- )
- };
($node_a: expr, $node_b: expr, $commitment_signed: expr, $fail_backwards: expr, true /* skip last step */, false /* return extra message */, true /* return last RAA */) => {{
$crate::ln::functional_test_utils::check_added_monitors(&$node_a, 0);
assert!($node_a.node.get_and_clear_pending_msg_events().is_empty());
Why this scored 11/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.