trie: remove redundant returns + use stacktrie where applicable (#22760)
* trie: add benchmark for proofless range * trie: remove unused returns + use stacktrie
This commit is contained in:
committed by
GitHub
parent
abb6cfae6a
commit
a81cf0d2b3
@ -170,17 +170,11 @@ func (f *fuzzer) fuzz() int {
|
||||
}
|
||||
ok = 1
|
||||
//nodes, subtrie
|
||||
nodes, subtrie, notary, hasMore, err := trie.VerifyRangeProof(tr.Hash(), first, last, keys, vals, proof)
|
||||
nodes, hasMore, err := trie.VerifyRangeProof(tr.Hash(), first, last, keys, vals, proof)
|
||||
if err != nil {
|
||||
if nodes != nil {
|
||||
panic("err != nil && nodes != nil")
|
||||
}
|
||||
if subtrie != nil {
|
||||
panic("err != nil && subtrie != nil")
|
||||
}
|
||||
if notary != nil {
|
||||
panic("err != nil && notary != nil")
|
||||
}
|
||||
if hasMore {
|
||||
panic("err != nil && hasMore == true")
|
||||
}
|
||||
@ -188,12 +182,6 @@ func (f *fuzzer) fuzz() int {
|
||||
if nodes == nil {
|
||||
panic("err == nil && nodes == nil")
|
||||
}
|
||||
if subtrie == nil {
|
||||
panic("err == nil && subtrie == nil")
|
||||
}
|
||||
if notary == nil {
|
||||
panic("err == nil && subtrie == nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok
|
||||
|
Reference in New Issue
Block a user