aboutsummaryrefslogtreecommitdiffstats
path: root/names/server.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-27 18:03:06 -0700
committerAdam Soltys <[email protected]>2026-10-27 18:03:06 -0700
commite7481b7e434546d666232ce3063e446aa68b1226 (patch)
treec1fc431553be812c4cec43302d6807219baeabd1 /names/server.js
parent5f758f0583ba03adeab4daedc066714b358218d1 (diff)
downloadcoinosv3-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/server.js')
-rw-r--r--names/server.js5
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}`);