From 66113070c59cfabf7b418828d174f70c55a21dd6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 7 Oct 2026 08:21:48 -0700 Subject: expired-dust-test: skip unless captaind runs a short vtxo lifetime It needs vtxo_lifetime <= 60 so it can mine past expiry; against the normal 4320-block server it would age the whole shared chain. Also import the manager relative to the repo instead of the main checkout's absolute path. Co-Authored-By: Claude Opus 5.5 --- tools/ark/expired-dust-test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/ark/expired-dust-test.js b/tools/ark/expired-dust-test.js index 4741fb8..c23bd52 100644 --- a/tools/ark/expired-dust-test.js +++ b/tools/ark/expired-dust-test.js @@ -15,7 +15,8 @@ import { generateMnemonic, mnemonicToSeedSync } from '@scure/bip39'; import { wordlist } from '@scure/bip39/wordlists/english'; import { HDKey } from '@scure/bip32'; -import { ArkManager } from '/home/adam/coinosv3/src/ark/manager.js'; +import { ArkManager } from '../../src/ark/manager.js'; +import { getArkInfo } from '../../src/ark/proto.js'; const ARK = 'http://127.0.0.1:3535'; const ESPLORA = 'http://127.0.0.1:30002'; @@ -42,6 +43,14 @@ const waitBalance = async (mgr, want, tries = 15) => { return mgr.balance().spendableSat; }; +// Mining past a normal lifetime (4320 blocks) would expire every other coin on +// the shared regtest chain, so without the short-lifetime captaind this skips. +const { vtxoExpiryDelta } = await getArkInfo(ARK); +if (vtxoExpiryDelta > 60) { + console.log(`SKIP: needs captaind with a short vtxo_lifetime (<= 60 blocks); this one has ${vtxoExpiryDelta}`); + process.exit(0); +} + console.log('[setup] board fresh coins under the short lifetime'); const S = await newWallet(); const G1 = await newWallet(); // 1-sat bearer "gift" key -- cgit v1.2.3