mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
consensus: verify timeout from epochInfo instead of snap.NextEpochCandidates, close XFN-62 (#1850)
* use epochInfo.Masternodes instead of snap.NextEpochCandidates * remove missing snapshot test (now irrelevant) * add masternodes length check in getEpochSwitchInfo * get blockhash directly from vote object
This commit is contained in:
parent
0f682a8356
commit
9a61a4958d
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ func (x *XDPoS_v2) VerifyVoteMessage(chain consensus.ChainReader, vote *types.Vo
|
|||
return false, nil
|
||||
}
|
||||
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, chain.CurrentHeader(), chain.CurrentHeader().Hash())
|
||||
epochInfo, err := x.getEpochSwitchInfo(chain, nil, vote.ProposedBlockInfo.Hash)
|
||||
if err != nil {
|
||||
log.Error("[VerifyVoteMessage] Fail to get epochInfo when verifying vote message!", "blockNum", vote.ProposedBlockInfo.Number, "blockHash", vote.ProposedBlockInfo.Hash, "voteHash", vote.Hash(), "voteGapNumber", vote.GapNumber, "err", err)
|
||||
return false, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue