Commit 2a9f8dca authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #7409 from ethereum-optimism/aj/stop-geth-on-failure

devnet: Ensure geth terminates if devnet-allocs fails
parents bd7e7965 5c7993b8
...@@ -156,19 +156,21 @@ def devnet_l1_genesis(paths): ...@@ -156,19 +156,21 @@ def devnet_l1_genesis(paths):
'--rpc.allow-unprotected-txs' '--rpc.allow-unprotected-txs'
]) ])
forge = ChildProcess(deploy_contracts, paths) try:
forge.start() forge = ChildProcess(deploy_contracts, paths)
forge.join() forge.start()
err = forge.get_error() forge.join()
if err: err = forge.get_error()
raise Exception(f"Exception occurred in child process: {err}") if err:
raise Exception(f"Exception occurred in child process: {err}")
res = debug_dumpBlock('127.0.0.1:8545')
response = json.loads(res) res = debug_dumpBlock('127.0.0.1:8545')
allocs = response['result'] response = json.loads(res)
allocs = response['result']
write_json(paths.allocs_path, allocs)
geth.terminate() write_json(paths.allocs_path, allocs)
finally:
geth.terminate()
# Bring up the devnet where the contracts are deployed to L1 # 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