mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
fix: ignore key-not-found errors in testWitness (#1164)
* fix: ignore key-not-found errors in testWitness * chore: auto version bump [bot] --------- Co-authored-by: omerfirmak <10325815+omerfirmak@users.noreply.github.com>
This commit is contained in:
parent
bbe9809b12
commit
d6b4c96bf1
2 changed files with 4 additions and 3 deletions
|
|
@ -44,6 +44,7 @@ import (
|
|||
"github.com/scroll-tech/go-ethereum/rollup/rcfg"
|
||||
"github.com/scroll-tech/go-ethereum/rpc"
|
||||
"github.com/scroll-tech/go-ethereum/trie"
|
||||
"github.com/syndtr/goleveldb/leveldb"
|
||||
)
|
||||
|
||||
// PublicEthereumAPI provides an API to access Ethereum full node-related
|
||||
|
|
@ -384,7 +385,7 @@ func generateWitness(blockchain *core.BlockChain, block *types.Block) (*stateles
|
|||
func testWitness(blockchain *core.BlockChain, block *types.Block, witness *stateless.Witness) error {
|
||||
stateRoot := witness.Root()
|
||||
diskRoot, err := rawdb.ReadDiskStateRoot(blockchain.Database(), stateRoot)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
|
||||
return fmt.Errorf("failed to read disk state root for stateRoot %s: %w", stateRoot.Hex(), err)
|
||||
}
|
||||
if diskRoot != (common.Hash{}) {
|
||||
|
|
@ -409,7 +410,7 @@ func testWitness(blockchain *core.BlockChain, block *types.Block, witness *state
|
|||
|
||||
postStateRoot := block.Root()
|
||||
diskRoot, err = rawdb.ReadDiskStateRoot(blockchain.Database(), postStateRoot)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
|
||||
return fmt.Errorf("failed to read disk state root for postStateRoot %s: %w", postStateRoot.Hex(), err)
|
||||
}
|
||||
if diskRoot != (common.Hash{}) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 5 // Major version component of the current release
|
||||
VersionMinor = 8 // Minor version component of the current release
|
||||
VersionPatch = 34 // Patch version component of the current release
|
||||
VersionPatch = 35 // Patch version component of the current release
|
||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue