aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/cln_schema.sql
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-05-20 08:53:09 -0700
committerAdam Soltys <[email protected]>2026-05-20 08:53:09 -0700
commit51107ed4b4079238ed1f657ec7231943f3c08696 (patch)
tree5f92ce79894c13cafa0c2cc3ab61cc3d92ad29d9 /scripts/cln_schema.sql
parent9142b4dbcce407e331a2c1c9b56bb1ead3d3df76 (diff)
downloadcoinos-server-51107ed4b4079238ed1f657ec7231943f3c08696.tar.gz
coinos-server-51107ed4b4079238ed1f657ec7231943f3c08696.zip
sendLightning/sendKeysend: instrument exit paths to surface stuck-debit cases
Diagnosing the stuck "optimistic" state seen on payment 30976bc9 (joho33, 2026-05-19): confirmed=true with no preimage, not in the pending set, so check() couldn't reconcile. Most likely path: ln.xpay returned without throwing but with failed_parts > 0; the previous `if (!r.failed_parts)` guard skipped finalize, no catch ran, and the debit was left stranded. Adds: - Log the full xpay/keysend response shape (status, failed_parts, parts, amount_sent_msat, has_preimage) so we can see what CLN actually returned. - Handle the failed_parts branch explicitly — verify with listpays and finalize, reverse, or leave pending based on actual outcome. - Track an `outcome` string through every branch and log it before returning or throwing. - "LEAKED DEBIT" err line at the function-end if we return without a clean finalize — that's the exact stuck state we want zero of. grep `LEAKED DEBIT` in app logs to catch any future occurrences immediately. Same instrumentation pattern applied to sendKeysend. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Diffstat (limited to 'scripts/cln_schema.sql')
0 files changed, 0 insertions, 0 deletions