mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
fix: read from snap error should continue to read from db
This commit is contained in:
parent
a71f6f91fd
commit
360e4ff07a
1 changed files with 4 additions and 2 deletions
|
|
@ -206,13 +206,15 @@ func (s *stateObject) GetCommittedState(key common.Hash) common.Hash {
|
|||
s.db.SnapshotStorageReads += time.Since(start)
|
||||
|
||||
if len(enc) > 0 {
|
||||
_, content, _, err := rlp.Split(enc)
|
||||
var content []byte
|
||||
_, content, _, err = rlp.Split(enc)
|
||||
if err != nil {
|
||||
s.db.setError(err)
|
||||
}
|
||||
} else {
|
||||
value.SetBytes(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the snapshot is unavailable or reading from it fails, load from the database.
|
||||
if s.db.snap == nil || err != nil {
|
||||
start := time.Now()
|
||||
|
|
|
|||
Loading…
Reference in a new issue