all: port boring changes from pbss (#27176)

* all: port boring changes from pbss

* core, trie: address comments from martin

* trie: minor fixes

* core/rawdb: update comment

* core, eth, tests, trie: address comments

* tests, trie: add extra check when update trie database

* trie/triedb/hashdb: degrade the error to warning
This commit is contained in:
rjl493456442
2023-05-09 10:11:04 +03:00
committed by GitHub
parent 81d328a73e
commit 5021d36d35
30 changed files with 1056 additions and 555 deletions
+3 -1
View File
@@ -27,9 +27,11 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/trie/trienode"
"golang.org/x/crypto/sha3"
)
@@ -184,7 +186,7 @@ func (f *fuzzer) fuzz() int {
// Flush trie -> database
rootA, nodes := trieA.Commit(false)
if nodes != nil {
dbA.Update(trie.NewWithNodeSet(nodes))
dbA.Update(rootA, types.EmptyRootHash, trienode.NewWithNodeSet(nodes))
}
// Flush memdb -> disk (sponge)
dbA.Commit(rootA, false)