core: store genesis allocation and recommit them if necessary (#24460)

* core: store genesis allocation and recommit them if necessary

* core: recover predefined genesis allocation if possible
This commit is contained in:
rjl493456442
2022-03-22 17:53:22 +08:00
committed by GitHub
parent 34501ed235
commit 7ae6c4a790
6 changed files with 145 additions and 15 deletions

View File

@ -386,6 +386,8 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {
preimages.Add(size)
case bytes.HasPrefix(key, configPrefix) && len(key) == (len(configPrefix)+common.HashLength):
metadata.Add(size)
case bytes.HasPrefix(key, genesisPrefix) && len(key) == (len(genesisPrefix)+common.HashLength):
metadata.Add(size)
case bytes.HasPrefix(key, bloomBitsPrefix) && len(key) == (len(bloomBitsPrefix)+10+common.HashLength):
bloomBits.Add(size)
case bytes.HasPrefix(key, BloomBitsIndexPrefix):