Skip to content

Commit

Permalink
Merge branch 'ethereum:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kant777 authored Dec 26, 2023
2 parents 6bc8d50 + d2e3cb8 commit 0201a57
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions core/rawdb/accessors_trie.go
Original file line number Diff line number Diff line change
@@ -292,6 +292,11 @@ func ReadStateScheme(db ethdb.Reader) string {
if len(blob) != 0 {
return PathScheme
}
// The root node might be deleted during the initial snap sync, check
// the persistent state id then.
if id := ReadPersistentStateID(db); id != 0 {
return PathScheme
}
// In a hash-based scheme, the genesis state is consistently stored
// on the disk. To assess the scheme of the persistent state, it
// suffices to inspect the scheme of the genesis state.
6 changes: 3 additions & 3 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
@@ -331,10 +331,10 @@ func (s *StateDB) GetCodeSize(addr common.Address) int {

func (s *StateDB) GetCodeHash(addr common.Address) common.Hash {
stateObject := s.getStateObject(addr)
if stateObject == nil {
return common.Hash{}
if stateObject != nil {
return common.BytesToHash(stateObject.CodeHash())
}
return common.BytesToHash(stateObject.CodeHash())
return common.Hash{}
}

// GetState retrieves a value from the given account's storage trie.
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ import (
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 13 // Minor version component of the current release
VersionPatch = 8 // Patch version component of the current release
VersionPatch = 9 // Patch version component of the current release
VersionMeta = "unstable" // Version metadata to append to the version string
)

0 comments on commit 0201a57

Please sign in to comment.