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

pytest: test to reproduce failed to retransmit funding transaction

Public commit record

What the developer wrote

Authored by enaples

83/100 · Strong
pytest: test to reproduce failed to retransmit funding transaction

`resend_opening_transactions` gated on `channel->depth != 0`, but depth is reset to 0 when channels are loaded from the DB and only repopulated `after begin_topology()` runs. So at startup every channel matched and `bitcoind` rejected the rebroadcast with error `-27` ("Transaction outputs already in utxo set"), facing as an `UNUSUAL` log.

Changelog-Fixed: lightningd: don't spuriously try to re-broadcast funding txs of already-confirmed channels on startup.
✓ 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 pytest test case that reproduces a minor startup logging bug. Core Lightning was unnecessarily trying to re-broadcast already-confirmed channel funding transactions every time it restarted. Bitcoin rejected the rebroadcast, causing harmless but noisy 'UNUSUAL' log messages. There is no loss of funds, remote attacker capability, or code change to the daemon itself in this commit.

Recommended action

Verify that the corresponding daemon-side fix (likely a separate commit) has already landed before relying on this test. The test itself is safe to merge as a regression check. No urgent security response is needed.

Security signals we found

01

Spurious rebroadcast of funding transactions on restart

02

Incorrect channel depth check at startup due to DB load ordering

03

Regression test added; no daemon code patched in this commit

Risk score

Why this scored 17/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 2/15
Affected reach 3/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.