Make startup_regtest.sh more robust to bitcoind wallet state

This commit is contained in:
Greg Sanders
2023-03-20 10:02:21 -04:00
committed by Rusty Russell
parent 887c6f71cf
commit cf662e55a7

View File

@@ -144,6 +144,8 @@ start_ln() {
# Modern bitcoind needs createwallet
echo "Making \"default\" bitcoind wallet."
bitcoin-cli -regtest createwallet default >/dev/null 2>&1
# But it might already exist, load it
bitcoin-cli -regtest loadwallet default
bitcoin-cli -regtest generatetoaddress 1 "$(bitcoin-cli -regtest getnewaddress)" > /dev/null
else
bitcoin-cli -regtest loadwallet default