Skip to content

Commit ee3c994

Browse files
committed
fix(tabconf7): use just cli on _init_regtest_sp to communicate with bitcoind regtest
The changes 098edf7 introduced a bug and uncovered the real issue behind the `_init_regtest_sp` command. Up to that commit the initialization was using the output from the signet chain set up inside the nix environment. As the environment was built ensuring signet was running, the issue was not evident, until someone tried using it outside of the nix environment. The 098edf7 changes assumed the command was just referring to the wrong blockchain, and applied a fix along these lines. This change later uncovered other issues. The simplest fix is to use the agnostic `just cli` recipe, that only knows about the regtest ports and uses the credentials set up during initialization.
1 parent e7a7f27 commit ee3c994

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

doc/tabconf7/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ _init_regtest_sp:
483483
#!/usr/bin/env bash
484484
if [ ! -f ".regtest_tr_xprv" ]; then
485485
rm -rf ".sp_cli2_regtest.db"
486-
BLOCKCHAININFO=$(bitcoin-cli --datadir=$BITCOIN_DATA_DIR --chain=regtest getblockchaininfo)
486+
BLOCKCHAININFO=$(just cli getblockchaininfo)
487487
HEIGHT=$(echo $BLOCKCHAININFO | jq -r '.blocks')
488488
HASH=$(echo $BLOCKCHAININFO | jq -r '.bestblockhash')
489489
DB_PATH=".sp_cli2_regtest.db" sp-cli2 create --network regtest --birthday-height $HEIGHT --birthday-hash $HASH | jq -r '.tr_xprv' > ".regtest_tr_xprv"

0 commit comments

Comments
 (0)