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

doc: document error 313 on every command which can return it

Public commit record

What the developer wrote

Authored by Peter Neuroth

73/100 · Adequate
doc: document error 313 on every command which can return it

FUND_CANNOT_AFFORD_WITH_EMERGENCY is raised in exactly two places,
`fundpsbt` and `utxopsbt` (wallet/reservation.c), when the node has an
anchor channel and the transaction would not leave `min-emergency-msat`
behind. Note that this does not require `opening_anchor_channel`: any
existing anchor channel is enough.

Every other command which can return it does so by forwarding one of
those two errors verbatim, but only `withdraw`, `fundchannel` and
`multifundchannel` documented it. Add it to the rest:

- `fundpsbt` and `utxopsbt`, which raise it directly;
- `txprepare` and `multiwithdraw`, which call them;
- `upgradewallet`, which calls `utxopsbt` via txprepare_continue() and
had no `errors` section at all, so document -1 and 301 there too.

Changelog-None
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit only updates documentation. It adds error code 313 to the documented error lists for several Core Lightning commands (fundpsbt, utxopsbt, txprepare, multiwithdraw, and upgradewallet). The error code already existed in the code and was already documented for some commands; this change makes the documentation complete and consistent. No code behavior changes.

Recommended action

No security action required. This is a documentation-only change. Treat as routine documentation maintenance.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

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