diff options
| author | Adam Soltys <[email protected]> | 2026-10-27 18:03:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-27 18:03:06 -0700 |
| commit | e7481b7e434546d666232ce3063e446aa68b1226 (patch) | |
| tree | c1fc431553be812c4cec43302d6807219baeabd1 /names | |
| parent | 5f758f0583ba03adeab4daedc066714b358218d1 (diff) | |
| download | coinosv3-server-e7481b7e434546d666232ce3063e446aa68b1226.tar.gz coinosv3-server-e7481b7e434546d666232ce3063e446aa68b1226.zip | |
names: a payment for a released name with no key to follow is parked, not retried (and paged on) forever
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QjVvE4YAcK3AGwV7kZXeN4
Diffstat (limited to 'names')
| -rw-r--r-- | names/server.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/names/server.js b/names/server.js index a9ade90..118f7fe 100644 --- a/names/server.js +++ b/names/server.js @@ -440,7 +440,10 @@ async function forwardOnce(name, sat, hash, pubkey) { const now = keyed.find((n) => n.endsWith('@' + name.split('@')[1])) || keyed[0]; if (now) { log(`forward: ${name} is gone — ${sat} sat goes to ${now}, the same key's name now`); name = now; rec = state.names[now]; } } - const dest = rec && arkParamOf(rec.uri); + // released and no key to follow it by: nothing will ever answer, so it + // waits for a person in the parked ledger instead of paging every 30 min + if (!rec) throw Object.assign(new Error(`${name} was released and no key holds a name now`), { permanent: true }); + const dest = arkParamOf(rec.uri); const clink = clinkDest(rec); // stays queued (and loud): a returned "success" here once dropped a payment if (!dest && !clink) throw new Error(`nowhere to send ${sat} sat for ${name}`); |
