diff options
| author | Adam Soltys <[email protected]> | 2026-10-07 08:21:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-07 08:21:48 -0700 |
| commit | 66113070c59cfabf7b418828d174f70c55a21dd6 (patch) | |
| tree | a69defab71ca0d75ccaf8289be94d278112d374a | |
| parent | 90d0396819ddfbabb8b7f45e8fc3ac0992a6b014 (diff) | |
| download | coinosv3-66113070c59cfabf7b418828d174f70c55a21dd6.tar.gz coinosv3-66113070c59cfabf7b418828d174f70c55a21dd6.zip | |
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 <[email protected]>
| -rw-r--r-- | tools/ark/expired-dust-test.js | 11 |
1 files changed, 10 insertions, 1 deletions
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 |
