Skip to content

Commit d6b4c96

Browse files
authored
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 <[email protected]>
1 parent bbe9809 commit d6b4c96

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

eth/api.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import (
4444
"github.com/scroll-tech/go-ethereum/rollup/rcfg"
4545
"github.com/scroll-tech/go-ethereum/rpc"
4646
"github.com/scroll-tech/go-ethereum/trie"
47+
"github.com/syndtr/goleveldb/leveldb"
4748
)
4849

4950
// PublicEthereumAPI provides an API to access Ethereum full node-related
@@ -384,7 +385,7 @@ func generateWitness(blockchain *core.BlockChain, block *types.Block) (*stateles
384385
func testWitness(blockchain *core.BlockChain, block *types.Block, witness *stateless.Witness) error {
385386
stateRoot := witness.Root()
386387
diskRoot, err := rawdb.ReadDiskStateRoot(blockchain.Database(), stateRoot)
387-
if err != nil {
388+
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
388389
return fmt.Errorf("failed to read disk state root for stateRoot %s: %w", stateRoot.Hex(), err)
389390
}
390391
if diskRoot != (common.Hash{}) {
@@ -409,7 +410,7 @@ func testWitness(blockchain *core.BlockChain, block *types.Block, witness *state
409410

410411
postStateRoot := block.Root()
411412
diskRoot, err = rawdb.ReadDiskStateRoot(blockchain.Database(), postStateRoot)
412-
if err != nil {
413+
if err != nil && !errors.Is(err, leveldb.ErrNotFound) {
413414
return fmt.Errorf("failed to read disk state root for postStateRoot %s: %w", postStateRoot.Hex(), err)
414415
}
415416
if diskRoot != (common.Hash{}) {

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 5 // Major version component of the current release
2626
VersionMinor = 8 // Minor version component of the current release
27-
VersionPatch = 34 // Patch version component of the current release
27+
VersionPatch = 35 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)