Fix the build of serialized_sized

This commit is contained in:
Zahary Karadjov 2019-03-12 15:38:58 +02:00
parent 0206496663
commit 5d186ef93c
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ proc writeValue*(w: var SszWriter, obj: auto) =
when defined(debugFieldSizes) and obj is (BeaconState|BeaconBlock):
let start = w.stream.pos
w.writeValue field
debugEcho k, ": ", w.stream.pos - start
debugEcho fieldName, ": ", w.stream.pos - start
else:
w.writeValue field
w.endRecord(memo)

View File

@ -20,6 +20,6 @@ proc stateSize(deposits: int, maxContent = false) =
len(crosslink_committees[0].committee) # close enough..
for a in state.latest_attestations.mitems():
a.aggregation_bitfield.setLen(validatorsPerCommittee)
echo "Validators: ", deposits, ", total: ", state.serialize().len
echo "Validators: ", deposits, ", total: ", SSZ.encode(state).len
dispatch(stateSize)