mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 14:26:26 +00:00
28d6cd2524
* rolls back some of the ref changes * adds utility to calculate stack sizes * works around bugs in nim exception handling and rvo
25 lines
455 B
Nim
25 lines
455 B
Nim
import ../beacon_chain/spec/datatypes
|
|
|
|
import typetraits, strformat, strutils
|
|
|
|
proc print(t: auto, n: string, indent: int) =
|
|
echo fmt"{sizeof(t):>8} {spaces(indent)}{n}: {typeof(t).name}"
|
|
|
|
when t is object|tuple:
|
|
for n, p in t.fieldPairs:
|
|
print(p, n, indent + 1)
|
|
|
|
print(BeaconState(), "state", 0)
|
|
|
|
echo ""
|
|
|
|
print(SignedBeaconBlock(), "block", 0)
|
|
|
|
echo ""
|
|
|
|
print(Validator(), "validator", 0)
|
|
|
|
echo ""
|
|
|
|
print(Attestation(), "attestation", 0)
|