tests/regtest: fix restarting bitcoind
Previously, the test wallet was not loaded after restarting bitcoind and generating blocks failed.
This commit is contained in:
parent
49086abcc5
commit
82c92df162
|
@ -229,10 +229,11 @@ let
|
|||
services.bitcoind.regtest = true;
|
||||
systemd.services.bitcoind.postStart = mkAfter ''
|
||||
cli=${config.services.bitcoind.cli}/bin/bitcoin-cli
|
||||
# Don't fail when wallet already exists
|
||||
$cli createwallet "test" || true
|
||||
address=$($cli getnewaddress)
|
||||
if ! $cli listwallets | ${pkgs.jq}/bin/jq -e 'index("test")'; then
|
||||
$cli -named createwallet wallet_name=test load_on_startup=true
|
||||
address=$($cli -rpcwallet=test getnewaddress)
|
||||
$cli generatetoaddress 10 $address
|
||||
fi
|
||||
'';
|
||||
|
||||
# lightning-loop contains no builtin swap server for regtest.
|
||||
|
|
Loading…
Reference in New Issue
Block a user