log json errors when loading deposits
This commit is contained in:
parent
9cfbdb5e16
commit
6d798c821f
|
@ -238,7 +238,7 @@ func initialize_beacon_state_from_eth1*(
|
|||
for i, deposit in deposits:
|
||||
let deposit_data_list = leaves[0..i]
|
||||
state.eth1_data.deposit_root = hash_tree_root(
|
||||
sszList(deposit_data_list, int64(2^DEPOSIT_CONTRACT_TREE_DEPTH)))
|
||||
sszList(deposit_data_list, 2'i64^DEPOSIT_CONTRACT_TREE_DEPTH))
|
||||
|
||||
discard process_deposit(state, deposit, flags)
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import
|
||||
os, ospaths, strutils, strformat,
|
||||
chronicles, chronos, blscurve, nimcrypto, json_serialization, web3, stint,
|
||||
chronicles, chronos, blscurve, nimcrypto, json_serialization, serialization,
|
||||
web3, stint,
|
||||
spec/[datatypes, digest, crypto], conf, time, ssz, interop
|
||||
|
||||
contract(DepositContract):
|
||||
|
@ -30,7 +31,8 @@ proc generateDeposits*(
|
|||
try:
|
||||
result.add Json.loadFile(depositFn, Deposit)
|
||||
continue
|
||||
except: # CatchableError?
|
||||
except SerializationError as err:
|
||||
debug "Rewriting unreadable deposit", err = err.formatMsg(depositFn)
|
||||
discard
|
||||
|
||||
let
|
||||
|
|
|
@ -11,7 +11,7 @@ git clone https://github.com/status-im/nim-beacon-chain.git
|
|||
cd nim-beacon-chain
|
||||
|
||||
make # prepare build system (cloning the correct submodules)
|
||||
make update deps # build dependencies
|
||||
make update # build dependencies
|
||||
```
|
||||
|
||||
## Running
|
||||
|
|
Loading…
Reference in New Issue