aboutsummaryrefslogtreecommitdiffstats
path: root/names/server.js
diff options
context:
space:
mode:
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}`);