mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
skip the ancient check when prunning turned on
This commit is contained in:
parent
815f402a56
commit
a6e42641a2
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, freezer string, namespace st
|
||||||
// validate in this method. If, however, the genesis hash is not nil, compare
|
// validate in this method. If, however, the genesis hash is not nil, compare
|
||||||
// it to the freezer content.
|
// it to the freezer content.
|
||||||
// TODO consider deprecate this check
|
// TODO consider deprecate this check
|
||||||
if kvgenesis, _ := db.Get(headerHashKey(0)); len(kvgenesis) > 0 {
|
if kvgenesis, _ := db.Get(headerHashKey(0)); len(kvgenesis) > 0 && !ancientPrune {
|
||||||
if frozen, _ := frdb.Ancients(); frozen > 0 {
|
if frozen, _ := frdb.Ancients(); frozen > 0 {
|
||||||
// If the freezer already contains something, ensure that the genesis blocks
|
// If the freezer already contains something, ensure that the genesis blocks
|
||||||
// match, otherwise we might mix up freezers across chains and destroy both
|
// match, otherwise we might mix up freezers across chains and destroy both
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue