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;
|
services.bitcoind.regtest = true;
|
||||||
systemd.services.bitcoind.postStart = mkAfter ''
|
systemd.services.bitcoind.postStart = mkAfter ''
|
||||||
cli=${config.services.bitcoind.cli}/bin/bitcoin-cli
|
cli=${config.services.bitcoind.cli}/bin/bitcoin-cli
|
||||||
# Don't fail when wallet already exists
|
if ! $cli listwallets | ${pkgs.jq}/bin/jq -e 'index("test")'; then
|
||||||
$cli createwallet "test" || true
|
$cli -named createwallet wallet_name=test load_on_startup=true
|
||||||
address=$($cli getnewaddress)
|
address=$($cli -rpcwallet=test getnewaddress)
|
||||||
$cli generatetoaddress 10 $address
|
$cli generatetoaddress 10 $address
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# lightning-loop contains no builtin swap server for regtest.
|
# lightning-loop contains no builtin swap server for regtest.
|
||||||
|
Loading…
Reference in New Issue
Block a user