core/state/snapshot: full featured account iteration

This commit is contained in:
Péter Szilágyi
2019-12-10 11:00:03 +02:00
parent e570835356
commit 6ddb92a089
10 changed files with 717 additions and 524 deletions

View File

@ -25,15 +25,6 @@ import (
"github.com/ethereum/go-ethereum/ethdb/memorydb"
)
// randomHash generates a random blob of data and returns it as a hash.
func randomHash() common.Hash {
var hash common.Hash
if n, err := rand.Read(hash[:]); n != common.HashLength || err != nil {
panic(err)
}
return hash
}
// Tests that given a database with random data content, all parts of a snapshot
// can be crrectly wiped without touching anything else.
func TestWipe(t *testing.T) {