Commit 5c7993b8 authored by Adrian Sutton's avatar Adrian Sutton

devnet: Ensure geth terminates if devnet-allocs fails

parent bd7e7965
......@@ -156,19 +156,21 @@ def devnet_l1_genesis(paths):
'--rpc.allow-unprotected-txs'
])
forge = ChildProcess(deploy_contracts, paths)
forge.start()
forge.join()
err = forge.get_error()
if err:
raise Exception(f"Exception occurred in child process: {err}")
res = debug_dumpBlock('127.0.0.1:8545')
response = json.loads(res)
allocs = response['result']
write_json(paths.allocs_path, allocs)
geth.terminate()
try:
forge = ChildProcess(deploy_contracts, paths)
forge.start()
forge.join()
err = forge.get_error()
if err:
raise Exception(f"Exception occurred in child process: {err}")
res = debug_dumpBlock('127.0.0.1:8545')
response = json.loads(res)
allocs = response['result']
write_json(paths.allocs_path, allocs)
finally:
geth.terminate()
# Bring up the devnet where the contracts are deployed to L1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment