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

wallet: make sure to watch all txids in transactions table.

Public commit record

What the developer wrote

Authored by Rusty Russell

85/100 · Strong
wallet: make sure to watch all txids in transactions table.

We watch if they are to do with a channel, or have outputs going to us, but otherwise
we didn't, so we never updated the blockheight in the db.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `listtransactions` now correctly updates `blockheight` for txs created by `sendpsbt` which have no change outputs.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bookkeeping bug in Core Lightning's wallet. When a user broadcast a transaction created with `sendpsbt` that had no change output coming back to the node, the node did not track the transaction's confirmation status. As a result, `listtransactions` would never show the correct `blockheight` for that transaction. The fix makes the node explicitly watch all unconfirmed transactions in its database so their confirmation height gets updated. There is no direct security exploit here; it is a data-correctness and user-experience issue.

Recommended action

No immediate security response is required. Operators and integrators should update to a release containing this commit if accurate `listtransactions` blockheight data is needed for accounting or auditing of `sendpsbt` spends without change outputs. Reviewers may want to confirm that `wallet_transactions_by_height(..., 0)` correctly maps to `blockheight IS NULL` on all supported database backends and that the new watch is cleaned up after confirmation.

Security signals we found

01

Missing confirmation tracking for externally-directed transactions

02

Database `blockheight` field left stale for unowned-output spends

03

Fix adds explicit txid watches for all unconfirmed wallet transactions

04

Test previously marked xfail is now enabled and parameterized over restart

Risk score

Why this scored 24/100

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