fix test_onion_message (follow-up previous commit)
What changed, and why it matters
This commit only adds a missing stub method to a mock object used in unit tests. It does not change any production code, network behavior, or wallet security logic. It is a test-only follow-up fix with no security relevance.
No security action needed. This is a routine test maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds is_initialized() returning True to the MockPeer class in tests/test_onion_message.py. This is a test fixture update to satisfy an interface expected by the code under test. No production code is modified, no cryptographic or payment logic is touched, and no vulnerability is introduced or fixed.
Changed components
tests/test_onion_message.pyInspect captured patch +3 / −0
diff --git a/tests/test_onion_message.py b/tests/test_onion_message.py
index 5f35b35..43908ea 100644
--- a/tests/test_onion_message.py
+++ b/tests/test_onion_message.py
@@ -283,6 +283,9 @@ class MockPeer:
async def wait_one_htlc_switch_iteration(self, *args):
pass
+ def is_initialized(self):
+ return True
+
def send_message(self, *args, **kwargs):
if self.on_send_message:
self.on_send_message(*args, **kwargs)
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.