mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 22:36:01 +00:00
521b0ed6ba
* beacon node code cleanup * rudimentary error checking on mainnet monitor * start client even when sending deposit * work around missing block number exception * connect to testnet with web3 url * pretty-print digests in json
25 lines
637 B
Nim
25 lines
637 B
Nim
import
|
|
os,
|
|
ssz,
|
|
serialization,
|
|
beacon_node_types,
|
|
./spec/[crypto, datatypes, digest]
|
|
|
|
proc dump*(dir: string, v: AttestationData, validator: ValidatorPubKey) =
|
|
SSZ.saveFile(
|
|
dir / "att-" & $v.slot & "-" &
|
|
$v.index & "-" & validator.shortLog &
|
|
".ssz", v)
|
|
|
|
proc dump*(dir: string, v: SignedBeaconBlock, blck: BlockRef) =
|
|
SSZ.saveFile(
|
|
dir / "block-" & $v.message.slot & "-" &
|
|
shortLog(blck.root) & ".ssz", v)
|
|
|
|
proc dump*(dir: string, v: HashedBeaconState, blck: BlockRef) =
|
|
SSZ.saveFile(
|
|
dir / "state-" & $v.data.slot & "-" &
|
|
shortLog(blck.root) & "-" & shortLog(v.root) & ".ssz",
|
|
v.data)
|
|
|