mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 01:40:44 +00:00
bug fix for count vote threshold
This commit is contained in:
parent
572660612d
commit
100ce5cbe5
2 changed files with 3 additions and 3 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.DetectEquivocationInVotePool(voteMsg, x.votePool)
|
||||||
go x.ForensicsProcessor.ProcessVoteEquivocation(chain, x, voteMsg)
|
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 {
|
if err != nil {
|
||||||
log.Error("[voteHandler] Error when getting epoch switch Info", "error", err)
|
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")
|
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 {
|
if err != nil {
|
||||||
log.Error("[voteHandler] Error when getting epoch switch Info", "error", err)
|
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")
|
return errors.New("Fail on voteHandler due to failure in getting epoch switch info")
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 2 // Major version component of the current release
|
VersionMajor = 2 // Major version component of the current release
|
||||||
VersionMinor = 4 // Minor version component of the current release
|
VersionMinor = 4 // Minor version component of the current release
|
||||||
VersionPatch = 1 // Patch version component of the current release
|
VersionPatch = 2 // Patch version component of the current release
|
||||||
VersionMeta = "beta1" // Version metadata to append to the version string
|
VersionMeta = "beta1" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue