aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lightning.ts
Commit message (Collapse)AuthorAgeFilesLines
* lightning: watchdog only recycles on real backlog, not normal idleAdam Soltys2026-06-171-10/+26
| | | | | | | | | | | | | Port of master 7b71c96b, refining the zombie-listener watchdog staging adopted in 7c34b431. Treating "waitanyinvoice blocked > 5min while cl is alive" as a stall false-fires during normal quiet periods (~26x in 6h on master 2026-06-07) and needlessly recycles the cl listen socket. Instead, when blocked past the threshold, probe cl on the MAIN socket with waitanyinvoice(pay_index, 2s server-side timeout): an invoice returned means a real backlog the wedged listener missed -> recycle; a timeout (CLN 904) means the listener is just idle -> leave it alone. Co-Authored-By: Claude Opus 4.8 <[email protected]>
* ark: skip refresh when ark unconfigured; document LN listener watchdogAdam Soltys2026-06-151-0/+3
| | | | | | | | Guard refreshArkWallet against running when config.ark.arkPrivateKey is unset, and add a comment explaining the ensureListenerAlive watchdog's zombie-socket recovery. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
* ln/lightning: watchdog recycles zombie receive-listener socketAdam Soltys2026-06-081-0/+39
| | | | | | | | | | | | | | | | | | Port of master bd1ece3 to staging. When cl restarts (e.g. autoheal after a healthcheck timeout), the app's waitanyinvoice long-poll can hang on the now-dead listen socket: listenerActive stays true forever, nothing restarts it, and incoming lightning payments silently stop crediting until a manual app restart. The per-call RPC timeout can't catch this — waitanyinvoice is meant to block. ensureListenerAlive (run every 120s) now also detects a stalled listener — active but blocked in waitanyinvoice for >5min — probes cl via the main socket (getinfo), and only if cl is actually alive treats the listen socket as a zombie: bumps a listenerEpoch, calls lnListen.reset() (new: drops the proxy socket so the next call reconnects), and re-arms. The epoch guard makes the wedged invocation bow out when its waitanyinvoice finally rejects, so we never run two listeners or double-credit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
* feat: blocked address protection, LNURL proxy, replay timestampsAdam Soltys2026-03-271-0/+2
| | | | | | | | | | - Add lib/changeid.ts for in-process account rekeying - Block sends to addresses in redis blocked_addresses set, auto-rekey on attempt - Add created param to credit() for accurate replay timestamps - Add paid_at to replay() for correct payment dates - Add /lnurl/proxy endpoint for server-side LNURL callback fetching Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
* migrate to honoAdam Soltys2026-02-281-2/+2
|
* formattingAdam Soltys2026-02-241-11/+5
|
* custodial ark sendsAdam Soltys2026-02-141-2/+2
|
* tigerbeetleAdam Soltys2026-02-061-1/+3
|
* health checkAdam Soltys2026-02-061-42/+103
|
* sendinvoice supportAdam Soltys2025-09-181-4/+6
|
* fix invoice lookupAdam Soltys2025-03-071-8/+2
|
* use getInvoice helperAdam Soltys2025-03-051-5/+9
|
* record payment_hashAdam Soltys2025-03-051-0/+2
|
* payment typesAdam Soltys2025-02-261-3/+4
|
* check if bolt11Adam Soltys2025-01-231-4/+2
|
* notes and stuffAdam Soltys2025-01-211-3/+9
|
* prettierAdam Soltys2025-01-141-8/+6
|
* handle zaps asynchronouslyAdam Soltys2025-01-061-2/+2
|
* fix bolt12Adam Soltys2024-12-261-3/+22
|
* bolt12 replayAdam Soltys2024-12-261-18/+15
|
* replay functionAdam Soltys2024-12-231-0/+53
|
* check for offersAdam Soltys2024-12-221-1/+1
|
* handle offersAdam Soltys2024-12-191-4/+6
|
* biome lintAdam Soltys2024-10-311-8/+14
|
* getpayment helperAdam Soltys2024-10-011-3/+2
|
* unused varsAdam Soltys2024-09-251-6/+2
|
* refactor rpc helper, accounts endpointsAdam Soltys2024-09-081-1/+1
|
* typescriptAdam Soltys2024-08-261-0/+52