Browse Source

Terminate BitcoinD if, for some reason, it doesn't start properly. This cleans up the environment for future test runs.

ppa-0.6.1
cornwarecjp 7 years ago
committed by Christian Decker
parent
commit
71581ff96e
  1. 8
      tests/test_lightningd.py

8
tests/test_lightningd.py

@ -38,7 +38,13 @@ def to_json(arg):
def setupBitcoind(directory):
global bitcoind
bitcoind = utils.BitcoinD(bitcoin_dir=directory, rpcport=28332)
bitcoind.start()
try:
bitcoind.start()
except:
tearDownBitcoind()
raise
info = bitcoind.rpc.getblockchaininfo()
# Make sure we have segwit and some funds
if info['blocks'] < 432:

Loading…
Cancel
Save