fuzz: Add fuzz tests for sparse merkle trie (#10662)

* Add fuzz tests for sparse merkle trie and change HTR signature to return an error

* fix capitalization of error message
This commit is contained in:
Preston Van Loon
2022-05-09 11:51:48 -05:00
committed by GitHub
parent 7d9d8454b1
commit 97663548a1
24 changed files with 418 additions and 90 deletions

View File

@@ -54,7 +54,10 @@ func GenerateGenesisStateFromDepositData(
if err != nil {
return nil, nil, errors.Wrap(err, "could not generate deposits from the deposit data provided")
}
root := trie.HashTreeRoot()
root, err := trie.HashTreeRoot()
if err != nil {
return nil, nil, errors.Wrap(err, "could not hash tree root of deposit trie")
}
if genesisTime == 0 {
genesisTime = uint64(time.Now().Unix())
}