tests/btcpayserver: test bitcoind P2P connection in regtest

nbxplorer requires at least 100 blocks (coinbase maturity) in regtest.
This commit is contained in:
Erik Arvstedt
2021-11-02 13:07:40 +01:00
parent 82c92df162
commit 083e141e3e
2 changed files with 18 additions and 6 deletions

View File

@@ -225,6 +225,7 @@ let
regtestBase = { config, ... }: {
tests.regtest = true;
test.data.num_blocks = 100;
services.bitcoind.regtest = true;
systemd.services.bitcoind.postStart = mkAfter ''
@@ -232,7 +233,7 @@ let
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
$cli generatetoaddress ${toString config.test.data.num_blocks} $address
fi
'';