diff options
| author | Adam Soltys <[email protected]> | 2026-08-07 22:59:54 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-07 23:29:26 -0700 |
| commit | a95a0dfd27980b01dbfe723d8be1ca4535b7d96a (patch) | |
| tree | c8b134a5bffe2b3b4bc19f6c6a5b6815f879038c /server.c | |
| parent | 582eab0d3e78d3c92b3fbf2d41d1845ca5761387 (diff) | |
| download | coinos-server-a95a0dfd27980b01dbfe723d8be1ca4535b7d96a.tar.gz coinos-server-a95a0dfd27980b01dbfe723d8be1ca4535b7d96a.zip | |
nwc: budget keysend, atomic dedup, serialize spends (S4/S6/S8)
- pay_keysend never called checkBudget and never recorded to
${pubkey}:payments, so a budget-limited connection string was a
full-drain credential. Budget-check it, honor max_fee, and record the
debit so subsequent budgeted calls count it (S4).
- Replace the non-atomic zScore-then-(unawaited)-zAdd dedup with an
awaited SET NX claim, so two concurrent deliveries of the same signed
event can't both reach handle() and pay twice; also reject
future-dated created_at beyond a small skew (S6).
- Serialize budget-affecting methods per app with an async mutex so a
concurrent request can't read a stale spent-total and overspend (S8).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Diffstat (limited to 'server.c')
0 files changed, 0 insertions, 0 deletions
