fix(docker): ensure wallet loaded before mining in regtest
bitcoin-cli -generate requires a loaded wallet, but Bitcoin Core 25+ no longer auto-creates one. After bitcoind restarts the miner loop silently failed, causing the chain to go stale and LND to report synced_to_chain: false. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
60f4eb6639
commit
c8e5bf9ee1
1 changed files with 4 additions and 0 deletions
|
|
@ -96,6 +96,10 @@ services:
|
|||
echo "Waiting for bitcoind..."
|
||||
sleep 5
|
||||
done
|
||||
# Ensure a wallet is loaded (-generate requires one)
|
||||
bitcoin-cli -regtest -rpcconnect=bitcoind createwallet default 2>/dev/null \
|
||||
|| bitcoin-cli -regtest -rpcconnect=bitcoind loadwallet default 2>/dev/null \
|
||||
|| true
|
||||
echo "bitcoind ready, starting mining loop"
|
||||
while true; do
|
||||
bitcoin-cli -regtest -rpcconnect=bitcoind -generate 1 > /dev/null 2>&1 && echo "Mined block $(bitcoin-cli -regtest -rpcconnect=bitcoind getblockcount)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue