mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 14:33:52 +00:00
Merge branch 'ethereum:master' into master
This commit is contained in:
commit
0201a57820
3 changed files with 9 additions and 4 deletions
|
|
@ -292,6 +292,11 @@ func ReadStateScheme(db ethdb.Reader) string {
|
||||||
if len(blob) != 0 {
|
if len(blob) != 0 {
|
||||||
return PathScheme
|
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
|
// In a hash-based scheme, the genesis state is consistently stored
|
||||||
// on the disk. To assess the scheme of the persistent state, it
|
// on the disk. To assess the scheme of the persistent state, it
|
||||||
// suffices to inspect the scheme of the genesis state.
|
// suffices to inspect the scheme of the genesis state.
|
||||||
|
|
|
||||||
|
|
@ -331,10 +331,10 @@ func (s *StateDB) GetCodeSize(addr common.Address) int {
|
||||||
|
|
||||||
func (s *StateDB) GetCodeHash(addr common.Address) common.Hash {
|
func (s *StateDB) GetCodeHash(addr common.Address) common.Hash {
|
||||||
stateObject := s.getStateObject(addr)
|
stateObject := s.getStateObject(addr)
|
||||||
if stateObject == nil {
|
if stateObject != nil {
|
||||||
return common.Hash{}
|
return common.BytesToHash(stateObject.CodeHash())
|
||||||
}
|
}
|
||||||
return common.BytesToHash(stateObject.CodeHash())
|
return common.Hash{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetState retrieves a value from the given account's storage trie.
|
// GetState retrieves a value from the given account's storage trie.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 1 // Major version component of the current release
|
VersionMajor = 1 // Major version component of the current release
|
||||||
VersionMinor = 13 // Minor 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
|
VersionMeta = "unstable" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue