What changed, and why it matters
This commit fixes a flaky test in LND's cooperative channel-closing code. The test sometimes panicked because an event arrived before the test had finished setting up its mock objects. The change lets tests install mock expectations first and then trigger the event, making the test suite more reliable. It does not change production code or fix a security vulnerability.
No security action needed. Treat as routine test-stability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies lnwallet/chancloser/rbf_coop_test.go only. It refactors assertSingleRemoteRbfIteration to accept a sendEvent callback instead of a boolean sendInit flag. This lets callers (e.g., TestRbfChannelFlushingTransitions/early_offer and TestRbfCloseClosingNegotiationRemote) register mock CloseSigner expectations before invoking SendEvent, eliminating a race that caused mock assertion panics in CI. No production logic is altered.
Changed components
lnwallet/chancloser/rbf_coop_test.goInspect captured patch +0 / −0
Diff not available from the source API.Why this scored 15/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.