mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/rawdb: improve state scheme checking
This commit is contained in:
parent
cca94792a4
commit
d490f3de14
1 changed files with 5 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue