Skip to content

Commit

Permalink
fix: specify wallet name in bitcoin conf
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Jan 25, 2024
1 parent 204ab4c commit 5e7e4a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ RUN <<EOF
bitcoind &
BTCD_PID=$!
bitcoin-cli -rpcwait getmininginfo
bitcoin-cli -named createwallet wallet_name="" descriptors=false
bitcoin-cli importprivkey $BTC_ADDR_WIF "" false
bitcoin-cli -named createwallet wallet_name=main descriptors=false
bitcoin-cli -rpcwallet=main importprivkey $BTC_ADDR_WIF "" false
bitcoin-cli generatetoaddress 101 $BTC_ADDR

node event-observer.js &
Expand All @@ -168,7 +168,7 @@ RUN <<EOF
done

while true; do
TX=$(bitcoin-cli listtransactions '*' 1 0 true)
TX=$(bitcoin-cli -rpcwallet=main listtransactions '*' 1 0 true)
CONFS=$(echo "$TX" | jq '.[].confirmations')
if [ "$CONFS" = "0" ]; then
echo "Detected Stacks mining mempool tx, mining btc block..."
Expand Down Expand Up @@ -238,7 +238,7 @@ cat > run.sh <<'EOM'

function start_miner() {
while true; do
TX=$(bitcoin-cli listtransactions '*' 1 0 true)
TX=$(bitcoin-cli -rpcwallet=main listtransactions '*' 1 0 true)
CONFS=$(echo "$TX" | jq '.[].confirmations')
if [ "$CONFS" = "0" ]; then
echo "Detected Stacks mining mempool tx, mining btc block..."
Expand Down
1 change: 1 addition & 0 deletions stacks-krypton-miner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ rpc_ssl = false
username = "$BITCOIN_RPC_USER"
password = "$BITCOIN_RPC_PASS"
timeout = 30
wallet_name = "main"

[[burnchain.epochs]]
epoch_name = "1.0"
Expand Down

0 comments on commit 5e7e4a1

Please sign in to comment.