Skip to content

Commit

Permalink
Merge pull request ethereum#88 from etclabscore/fix/retesteth-dao-ext…
Browse files Browse the repository at this point in the history
…radata

cmd/geth: use DAOSupport generic method instead of block nil check for ExtraData
  • Loading branch information
meowsbits authored Dec 16, 2019
2 parents 86873af + bb3087f commit 8994f25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/geth/retesteth.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params/convert"
"github.com/ethereum/go-ethereum/params/types"
"github.com/ethereum/go-ethereum/params/types/ctypes"
"github.com/ethereum/go-ethereum/params/types/goethereum"
Expand Down Expand Up @@ -475,8 +476,8 @@ func (api *RetestethAPI) mineBlock() error {
api.engine.Prepare(api.blockchain, header)
}
// If we are care about TheDAO hard-fork check whether to override the extra-data or not
if daoBlockUint64 := api.chainConfig.GetEthashEIP779Transition(); daoBlockUint64 != nil {
daoBlock := new(big.Int).SetUint64(*daoBlockUint64)
if convert.AsGenericCC(api.chainConfig).DAOSupport() {
daoBlock := new(big.Int).SetUint64(*api.chainConfig.GetEthashEIP779Transition())
// Check whether the block is among the fork extra-override range
limit := new(big.Int).Add(daoBlock, vars.DAOForkExtraRange)
if header.Number.Cmp(daoBlock) >= 0 && header.Number.Cmp(limit) < 0 {
Expand Down

0 comments on commit 8994f25

Please sign in to comment.