Include hash_tree_root in the SSZ fuzzing tests
This commit is contained in:
parent
2acda1c115
commit
37b4739547
|
@ -19,6 +19,9 @@ template sszFuzzingTest*(T: type) =
|
|||
|
||||
let reEncoded = SSZ.encode(decoded)
|
||||
|
||||
when T isnot SignedBeaconBlock:
|
||||
let hash = hash_tree_root(decoded)
|
||||
|
||||
if payload != reEncoded:
|
||||
when hasSerializationTracing:
|
||||
# Run deserialization again to produce a seriazation trace
|
||||
|
@ -30,6 +33,9 @@ template sszFuzzingTest*(T: type) =
|
|||
echo "Re-encoided payload with len = ", reEncoded.len
|
||||
echo reEncoded
|
||||
|
||||
when T isnot SignedBeaconBlock:
|
||||
echo "HTR: ", hash
|
||||
|
||||
echo repr(decoded)
|
||||
|
||||
doAssert false
|
||||
|
|
Loading…
Reference in New Issue