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

trampoline: prevent adding ourself on the route

Public commit record

What the developer wrote

Authored by f321x

98/100 · Strong
trampoline: prevent adding ourself on the route

Followup #10541.
Fixes tests.regtest.TestLightningSwapserver.test_swapserver_forceclose.

In the regtest bob would now signal trampoline support due to #10541 and
include Alice into the invoice trampoline as he is connected to Alice.
Alice would then try to add herself onto the trampoline route, causing
the payment to fail.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Lightning trampoline routing where a payer could accidentally include themselves as a hop on the payment route. When a user had a direct channel with the recipient, their own public key could appear in the invoice's trampoline list, and the routing code would then try to route the payment through themselves. This caused legitimate payments to fail. The fix simply removes the user's own public key from the list of candidate trampoline hops before building the route.

Recommended action

No immediate security response required. This is a bug fix that prevents routing failures in trampoline payments when payer and payee share a direct channel. Users running Lightning trampoline payments should update to include this fix, especially if experiencing payment failures after PR #10541.

Security signals we found

01

Self-inclusion in payment route could cause payment failure (denial-of-service to own payment)

02

Lightning routing logic bug in trampoline payments

03

No evidence of malicious exploitation path in the diff

04

Fix is a defensive guard clause with minimal code change

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/10
Evidence quality 3/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.