diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index a622f0d7d0..8b9cfc7fb7 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -577,7 +577,7 @@ func (c *Bor) verifySeal(chain consensus.ChainReader, header *types.Header, pare } proposerIndex, _ := snap.ValidatorSet.GetByAddress(proposer) signerIndex, _ := snap.ValidatorSet.GetByAddress(signer) - limit := len(validators) - (len(validators)/2 + 1) + limit := len(validators)/2 + 1 // temp index tempIndex := signerIndex @@ -761,7 +761,7 @@ func (c *Bor) Seal(chain consensus.ChainReader, block *types.Block, results chan proposerIndex, _ := snap.ValidatorSet.GetByAddress(proposer) signerIndex, _ := snap.ValidatorSet.GetByAddress(signer) - limit := len(validators) - (len(validators)/2 + 1) + limit := len(validators)/2 + 1 // temp index tempIndex := signerIndex diff --git a/consensus/bor/snapshot.go b/consensus/bor/snapshot.go index 9d41d7f3fb..dc78a4ca1e 100644 --- a/consensus/bor/snapshot.go +++ b/consensus/bor/snapshot.go @@ -164,7 +164,7 @@ func (s *Snapshot) apply(headers []*types.Header) (*Snapshot, error) { proposer := snap.ValidatorSet.GetProposer().Address proposerIndex, _ := snap.ValidatorSet.GetByAddress(proposer) signerIndex, _ := snap.ValidatorSet.GetByAddress(signer) - limit := len(validators) - (len(validators)/2 + 1) + limit := len(validators)/2 + 1 // temp index tempIndex := signerIndex