You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de42903
Browse filesBrowse the repository at this point in the historyBrowse files
fix(platform-wallet): reserve the contact address across the send
The send now claims the contact address as Reserved, kept apart from the
Used flag that records an observed payment:
- Reserve under the manager lock (available, no resident record paying
it, funding reservation fresh), then store and flush before the
broadcast.
- Sent (or possibly sent): Reserved -> Used. Provably not sent (store
failure, rejection, stale at dispatch): release the reservation only.
A payment the wallet observed in flight already promoted it to Used,
so the release cannot erase it, even after a ChainLock evicted the
record. The settled pool is always stored and flushed.
- The FFI row is a reuse guard: Reserved now flattens to is_used = true,
so a crash mid-send cannot free the address on the Swift host; the
release stores false, which the host applies as written. SQLite keeps
the reservation reversibly (reserved_at); restoring it on load is #4188.
Tests: durable reservation before the broadcast (flush + Reserved in the
stored pool), an observation during the send surviving a rejection and
reaching disk, SQLite release/promote with a reload through
load_used_addresses, the flipped FFI round trip, and FFI boundary tests
for the prepared-payment endpoints.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments