mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
01e9df97cb
* remove broken serialized_sizes * actually use sszdump module * avoid bitops * fix stack_sizes module name
18 lines
572 B
Nim
18 lines
572 B
Nim
import
|
|
os, strformat,
|
|
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}-{shortLog(validator)}.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)
|