mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
Better error message on incompatible validator data when resetting a testnet
This commit is contained in:
parent
e228c2dbcb
commit
25494aa2fb
@ -722,7 +722,13 @@ when isMainModule:
|
||||
for i in config.firstValidator.int ..< config.totalValidators.int:
|
||||
let depositFile = config.validatorsDir /
|
||||
validatorFileBaseName(i) & ".deposit.json"
|
||||
deposits.add Json.loadFile(depositFile, Deposit)
|
||||
try:
|
||||
deposits.add Json.loadFile(depositFile, Deposit)
|
||||
except SerializationError as err:
|
||||
stderr.write "Error while loading a deposit file:\n"
|
||||
stderr.write err.formatMsg(depositFile), "\n"
|
||||
stderr.write "Please regenerate the deposit files by running validator_keygen again\n"
|
||||
quit 1
|
||||
|
||||
let initialState = get_genesis_beacon_state(
|
||||
deposits,
|
||||
|
Loading…
x
Reference in New Issue
Block a user