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:
|
for i, deposit in deposits:
|
||||||
let deposit_data_list = leaves[0..i]
|
let deposit_data_list = leaves[0..i]
|
||||||
state.eth1_data.deposit_root = hash_tree_root(
|
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)
|
discard process_deposit(state, deposit, flags)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import
|
import
|
||||||
os, ospaths, strutils, strformat,
|
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
|
spec/[datatypes, digest, crypto], conf, time, ssz, interop
|
||||||
|
|
||||||
contract(DepositContract):
|
contract(DepositContract):
|
||||||
|
@ -30,7 +31,8 @@ proc generateDeposits*(
|
||||||
try:
|
try:
|
||||||
result.add Json.loadFile(depositFn, Deposit)
|
result.add Json.loadFile(depositFn, Deposit)
|
||||||
continue
|
continue
|
||||||
except: # CatchableError?
|
except SerializationError as err:
|
||||||
|
debug "Rewriting unreadable deposit", err = err.formatMsg(depositFn)
|
||||||
discard
|
discard
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -11,7 +11,7 @@ git clone https://github.com/status-im/nim-beacon-chain.git
|
||||||
cd nim-beacon-chain
|
cd nim-beacon-chain
|
||||||
|
|
||||||
make # prepare build system (cloning the correct submodules)
|
make # prepare build system (cloning the correct submodules)
|
||||||
make update deps # build dependencies
|
make update # build dependencies
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
Loading…
Reference in New Issue