diff options
| author | Adam Soltys <[email protected]> | 2026-08-18 11:49:56 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-18 11:49:56 -0700 |
| commit | c553ea40de4aecd9453272599d450310d6e306b0 (patch) | |
| tree | 5c1b4f3c919826333c4f836b632fa47dc48b650d /src/ark | |
| parent | e1d4f0e0dcf8e13a79ed94b6c696805e8568318d (diff) | |
| download | coinosv3-c553ea40de4aecd9453272599d450310d6e306b0.tar.gz coinosv3-c553ea40de4aecd9453272599d450310d6e306b0.zip | |
Money stops arriving without a story: the mailbox checkpoint stays local reading progress (a merged one skipped every unprocessed message), vtxos that beat their message here get a backfilled receive, and the commit stamp takes its own footer line
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JtaatFfAbx91Nh3xqKVqKz
Diffstat (limited to 'src/ark')
| -rw-r--r-- | src/ark/manager.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js index eb23b51..99ae2c5 100644 --- a/src/ark/manager.js +++ b/src/ark/manager.js @@ -298,7 +298,16 @@ export class ArkManager { const ourKeys = [hex.encode(this._key(0).pubkey)]; const tip = await this._tipMemo(); for (const v of m.vtxos) { - if (this._vtxo(v.id)) continue; + if (this._vtxo(v.id)) { + // The vtxo beat the message here (a mirror or snapshot merge carried + // it) — the money is present but the story is missing. Backfill the + // receive movement so history matches the balance. + if (!this.state.movements.some((x) => x.vtxoId === v.id)) { + this._movement({ type: 'receive', amountSat: v.amountSat, status: 'complete', vtxoId: v.id, ts: this._estimateReceiveTs(this._decoded(this._vtxo(v.id)), tip) }); + changed = true; + } + continue; + } try { await validateVtxo(v, { serverPubkey: this.serverPub, chain: this.chain, expectPubkeys: ourKeys }); } catch (e) { |
