Skip to content

Commit

Permalink
Merge pull request ethereum#230 from ngtuna/double-validation-fix-1
Browse files Browse the repository at this point in the history
double validation bugfix
  • Loading branch information
ngtuna authored Oct 23, 2018
2 parents ac6e3fd + 59f3d3a commit 3b4106f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3b4106f

Please sign in to comment.