diff options
| author | Adam Soltys <[email protected]> | 2026-10-07 08:21:47 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-07 08:21:47 -0700 |
| commit | 90d0396819ddfbabb8b7f45e8fc3ac0992a6b014 (patch) | |
| tree | adb0aeb5e1919fb93838491168b2647160e88a07 /tools/ark/receive-test.js | |
| parent | bba8280a241ce86b0f372818d7aca85073d8e53a (diff) | |
| download | coinosv3-90d0396819ddfbabb8b7f45e8fc3ac0992a6b014.tar.gz coinosv3-90d0396819ddfbabb8b7f45e8fc3ac0992a6b014.zip | |
ark tests: shared aliceReady() keeps the bark funding wallet usable
scheduled-refresh-test mines a whole vtxo lifetime, which expires alice's
coins; every test run after it funded nothing (spendableSat 0) or was handed
an expired coin (receive-test). The helper refreshes expired coins and boards
more when alice runs low, and the funding tests call it before paying.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'tools/ark/receive-test.js')
| -rw-r--r-- | tools/ark/receive-test.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ark/receive-test.js b/tools/ark/receive-test.js index 1e6adbe..ac916ad 100644 --- a/tools/ark/receive-test.js +++ b/tools/ark/receive-test.js @@ -17,11 +17,11 @@ import { getArkInfo, handshake, encodeAddress, decodeAddress, blindMailboxId, readMailbox, } from '../../src/ark/proto.js'; +import { ALICE as ALICE_CLI, aliceReady } from './alice.js'; const ARK = process.env.ARK_URL || 'http://127.0.0.1:3535'; const ESPLORA = process.env.ESPLORA_URL || 'http://127.0.0.1:30002'; -const BARK = `${process.env.HOME}/bark/target/debug/bark`; -const ALICE = `${BARK} --datadir ${process.env.HOME}/ark-regtest/alice -q`; +const ALICE = `${ALICE_CLI} -q`; const AMOUNT_SAT = 12345; const MNEMONIC = 'rug rebuild abstract kiwi rifle vast food robust rifle spirit dilemma stumble'; @@ -57,6 +57,7 @@ console.log('round-trip decode:', decodeAddress(address)); // --- 3. pay it from the bark CLI --- console.log(`\npaying ${AMOUNT_SAT} sat from alice (bark CLI)...`); +await aliceReady(); execSync(`${ALICE} send ${address} "${AMOUNT_SAT} sat"`, { stdio: 'inherit' }); // --- 4. read mailbox, decode, validate --- |
