Browse Source

Wait for bitcoind to start instead of hardcoded sleep in tests.

master
Kristaps Kaupe 5 years ago
parent
commit
20b67e9bec
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 5
      conftest.py

5
conftest.py

@ -115,13 +115,12 @@ def setup(request):
bitcoin_args = ["-regtest", "-daemon", "-conf=" + bitcoin_conf]
btc_proc = subprocess.call([bitcoin_path + "bitcoind"] + bitcoin_args)
time.sleep(4)
#generate blocks; segwit activates around block 500-600
root_cmd = [bitcoin_path + "bitcoin-cli", "-regtest",
"-rpcuser=" + bitcoin_rpcusername,
"-rpcpassword=" + bitcoin_rpcpassword]
# Bitcoin Core v0.21+ does not create default wallet
local_command(root_cmd + ["createwallet", "jm-test-wallet"])
local_command(root_cmd + ["-rpcwait"] +
["createwallet", "jm-test-wallet"])
local_command(root_cmd + ["loadwallet", "jm-test-wallet"])
for i in range(2):
cpe = local_command(root_cmd + ["-rpcwallet=jm-test-wallet"] +

Loading…
Cancel
Save