fix: test_payment_path_scoring failing
What changed, and why it matters
This is a one-line test-only fix that adds a missing notification call when an event is pushed in a test helper. It makes a unit test reliable and has no apparent security relevance.
No security action required; treat as normal test reliability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds self.event_persist_notifier.notify() inside push_pending_event, a #[cfg(test)] helper in channelmanager.rs. The change ensures the persistence notifier is triggered when test code manually injects an event, which fixes a flaky test (test_payment_path_scoring). The function is gated behind test configuration and is not used in production code paths.
Changed components
lightning/src/ln/channelmanager.rstest-only helper `push_pending_event`Inspect captured patch +1 / −0
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 665a79a..b9301f5 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -14204,6 +14204,7 @@ impl<
pub fn push_pending_event(&self, event: events::Event) {
let mut events = self.pending_events.lock().unwrap();
events.push_back((event, None));
+ self.event_persist_notifier.notify();
}
#[cfg(test)]
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.