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

test_lnwallet: add unittest for unchanged channel update from failed htlc

Public commit record

What the developer wrote

Authored by f321x

83/100 · Strong
test_lnwallet: add unittest for unchanged channel update from failed htlc

Tests that a TEMPORARY_CHANNEL_FAILURE whose channel update leaves the
policy unchanged does not blacklist the channel (the liquidity hint is
sufficient), while other failure codes still blacklist.
✓ 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 unit test to Electrum's Lightning wallet test suite. It checks that when a payment fails due to a temporary lack of liquidity (TEMPORARY_CHANNEL_FAILURE) and the accompanying channel policy update is identical to what the wallet already knows, the channel is not blacklisted. Instead, only a 'liquidity hint' is recorded so smaller retry amounts can still use the channel. For other failure types, even an unchanged update still causes blacklisting. There is no production code change here.

Recommended action

No action required; this is a test-only commit. If reviewing the related production change, verify that handle_error_code_from_failed_htlc() correctly distinguishes TEMPORARY_CHANNEL_FAILURE with UpdateStatus.UNCHANGED from other failure codes and that liquidity hints are updated safely without enabling route probing abuse.

Security signals we found

01

Lightning payment routing failure handling behavior is being tested

02

TEMPORARY_CHANNEL_FAILURE no longer (or is confirmed not to) blacklist channels when the channel update is unchanged

03

Liquidity hints are used as an alternative to blacklisting for retry amounts

04

No production code modification is present in the commit

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.