AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 12 Bitcoin

tests: test_lnpeer: test compare trampoline onions

Public commit record

What the developer wrote

Authored by f321x

83/100 · Strong
tests: test_lnpeer: test compare trampoline onions

Adds test_forwarder_fails_for_inconsistent_trampoline_onions
which checks that a forwarder compares the trampoline onions of a mpp
set and fails the set if the onions are not similar.
In the test alice sends a mpp through bob with 2 htlcs, in one
trampoline onion amt_to_forward is off by 1 msat so bob fails the htlc
set instead of initiating the trampoline forwarding.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit only adds a new automated test to Electrum's Lightning networking code. It does not change any production behavior. The test verifies that a forwarding node (Bob) rejects a multi-part trampoline payment when the hidden 'trampoline onions' inside the payment parts disagree on the amount. This is a defensive correctness check, not a fix or vulnerability patch.

Recommended action

No action required; treat as routine test addition. If reviewing a related patch series, ensure the production consistency check being tested is present and correct in the non-test code.

Security signals we found

01

Trampoline forwarding consistency check is behavior under test, not newly introduced

02

Mocks onion-packet construction to simulate inconsistent MPP trampoline payloads

03

Asserts forwarder fails all HTLCs when trampoline onions disagree

04

No changes to lnworker, lnonion, trampoline, or channel state machine

Risk score

Why this scored 12/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.