mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Merge pull request #743 from XinFinOrg/bug-fix-use-right-block-to-count-vote-theshold
bug fix use right block to count vote threshold
This commit is contained in:
commit
fe801c88d4
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ func (x *XDPoS_v2) voteHandler(chain consensus.ChainReader, voteMsg *types.Vote)
|
|||
go x.ForensicsProcessor.DetectEquivocationInVotePool(voteMsg, x.votePool)
|
||||
go x.ForensicsProcessor.ProcessVoteEquivocation(chain, x, voteMsg)
|
||||
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, chain.CurrentHeader(), chain.CurrentHeader().Hash())
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, nil, voteMsg.ProposedBlockInfo.Hash)
|
||||
if err != nil {
|
||||
log.Error("[voteHandler] Error when getting epoch switch Info", "error", err)
|
||||
return errors.New("fail on voteHandler due to failure in getting epoch switch info")
|
||||
|
|
@ -175,7 +175,7 @@ func (x *XDPoS_v2) onVotePoolThresholdReached(chain consensus.ChainReader, poole
|
|||
}
|
||||
}
|
||||
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, chain.CurrentHeader(), chain.CurrentHeader().Hash())
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, nil, currentVoteMsg.(*types.Vote).ProposedBlockInfo.Hash)
|
||||
if err != nil {
|
||||
log.Error("[voteHandler] Error when getting epoch switch Info", "error", err)
|
||||
return errors.New("fail on voteHandler due to failure in getting epoch switch info")
|
||||
|
|
|
|||
Loading…
Reference in a new issue