From 2f0b5ce1434ba6028170b03ca6f4bd6114b94301 Mon Sep 17 00:00:00 2001 From: Jaynti Kanani Date: Tue, 3 Dec 2019 22:55:30 +0530 Subject: [PATCH] increase backup limit --- consensus/bor/bor.go | 4 ++-- consensus/bor/snapshot.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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