What changed, and why it matters
This is a tiny follow-up patch to a test file only. It changes one expected value in a unit test from the integer 1 to the raw byte string b"\x01" so the test correctly matches what the actual code returns. It does not change any production code, network behavior, or wallet logic, and has no security relevance.
No action required; this is a benign test-only fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
Commit 4fedab8b modifies tests/test_onion_message.py, updating an assertion in TestOnionMessage. The expected value for rp[‘num_hops’] is changed from the Python int 1 to the bytes object b”\x01”. This is purely a test-suite correction with no changes to Electrum’s onion-message implementation, serialization, or parsing logic.
Changed components
tests/test_onion_message.pyInspect captured patch +1 / −1
diff --git a/tests/test_onion_message.py b/tests/test_onion_message.py
index bc9868f..2b57b77 100644
--- a/tests/test_onion_message.py
+++ b/tests/test_onion_message.py
@@ -199,7 +199,7 @@ class TestOnionMessage(ElectrumTestCase):
self.assertEqual(pubkey, rp['first_node_id'])
self.assertEqual(bfh('022ed557f5ad336b31a49857e4e9664954ac33385aa20a93e2d64bfe7f08f51277'), rp['first_path_key'])
- self.assertEqual(1, rp['num_hops'])
+ self.assertEqual(b"\x01", rp['num_hops'])
self.assertEqual([{
'blinded_node_id': bfh('031e5d91e6c417f6e8c16d1086db1887edef7be9334f5e744d04edb8da7507481e'),
'enclen': 20,
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.