mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
Merge pull request #230 from ngtuna/double-validation-fix-1
double validation bugfix
This commit is contained in:
commit
3b4106fc12
1 changed files with 2 additions and 1 deletions
|
|
@ -191,7 +191,8 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
|||
|
||||
// Hook double validation
|
||||
doubleValidateHook := func(block *types.Block) error {
|
||||
snap, err := c.GetSnapshot(eth.blockchain, block.Header())
|
||||
parentBlk := eth.blockchain.GetBlockByHash(block.ParentHash())
|
||||
snap, err := c.GetSnapshot(eth.blockchain, parentBlk.Header())
|
||||
if err != nil {
|
||||
if err == consensus.ErrUnknownAncestor {
|
||||
log.Warn("Block chain forked.", "error", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue