mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix: only disable HasLegacyNode call for verkle-at-genesis testnets (#350)
This commit is contained in:
parent
eb31ae3f9e
commit
c1e0ff10ec
1 changed files with 17 additions and 17 deletions
|
|
@ -341,23 +341,23 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
|
||||||
}
|
}
|
||||||
// We have the genesis block in database(perhaps in ancient database)
|
// We have the genesis block in database(perhaps in ancient database)
|
||||||
// but the corresponding state is missing.
|
// but the corresponding state is missing.
|
||||||
// header := rawdb.ReadHeader(db, stored, 0)
|
header := rawdb.ReadHeader(db, stored, 0)
|
||||||
// if header.Root != types.EmptyRootHash && !rawdb.HasLegacyTrieNode(db, header.Root) {
|
if !genesis.Config.IsPrague(big.NewInt(0), genesis.Timestamp) && header.Root != types.EmptyRootHash && !rawdb.HasLegacyTrieNode(db, header.Root) {
|
||||||
// if genesis == nil {
|
if genesis == nil {
|
||||||
// genesis = DefaultGenesisBlock()
|
genesis = DefaultGenesisBlock()
|
||||||
// }
|
}
|
||||||
// // Ensure the stored genesis matches with the given one.
|
// Ensure the stored genesis matches with the given one.
|
||||||
// hash := genesis.ToBlock().Hash()
|
hash := genesis.ToBlock().Hash()
|
||||||
// if hash != stored {
|
if hash != stored {
|
||||||
// return genesis.Config, hash, &GenesisMismatchError{stored, hash}
|
return genesis.Config, hash, &GenesisMismatchError{stored, hash}
|
||||||
// }
|
}
|
||||||
// block, err := genesis.Commit(db, triedb)
|
block, err := genesis.Commit(db, triedb)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// return genesis.Config, hash, err
|
return genesis.Config, hash, err
|
||||||
// }
|
}
|
||||||
// applyOverrides(genesis.Config)
|
applyOverrides(genesis.Config)
|
||||||
// return genesis.Config, block.Hash(), nil
|
return genesis.Config, block.Hash(), nil
|
||||||
// }
|
}
|
||||||
// Check whether the genesis block is already written.
|
// Check whether the genesis block is already written.
|
||||||
if genesis != nil {
|
if genesis != nil {
|
||||||
applyOverrides(genesis.Config)
|
applyOverrides(genesis.Config)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue