Browse Source

Merge #799: Wait for bitcoind to start instead of hardcoded sleep in tests.

20b67e9 Wait for bitcoind to start instead of hardcoded sleep in tests. (Kristaps Kaupe)
master
Adam Gibson 5 years ago
parent
commit
88b348c83e
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  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