contrib: make startup_regtest.sh work for modern bitcoind.

They need us to create a wallet.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-02-18 10:07:09 +10:30
parent 9224d9a500
commit 8ad6972b25

View File

@ -116,6 +116,8 @@ start_ln() {
# Kick it out of initialblockdownload if necessary
if bitcoin-cli -regtest getblockchaininfo | grep -q 'initialblockdownload.*true'; then
# Modern bitcoind needs createwallet
bt-cli createwallet default >/dev/null 2>&1
bitcoin-cli -regtest generatetoaddress 1 "$(bitcoin-cli -regtest getnewaddress)" > /dev/null
fi
alias bt-cli='bitcoin-cli -regtest'