From f244881a0a2ae51dff60cb6dd0a6266c7fcf38c9 Mon Sep 17 00:00:00 2001 From: Daniil Lashin <3121312+danil-lashin@users.noreply.github.com> Date: Fri, 7 Feb 2020 14:46:12 +0300 Subject: [PATCH] Fix import issue --- core/state/candidates/candidates.go | 5 ++++- version/version.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/state/candidates/candidates.go b/core/state/candidates/candidates.go index ff92706f6..b337cb6de 100644 --- a/core/state/candidates/candidates.go +++ b/core/state/candidates/candidates.go @@ -658,7 +658,10 @@ func (c *Candidates) Punish(height uint64, address types.TmAddress) *big.Int { func (c *Candidates) SetStakes(pubkey types.Pubkey, stakes []types.Stake) { candidate := c.GetCandidate(pubkey) candidate.stakesCount = len(stakes) - for i := 0; i < len(stakes); i++ { + if candidate.stakesCount > 1000 { + candidate.stakesCount = 1000 + } + for i := 0; i < candidate.stakesCount; i++ { stake := stakes[i] candidate.stakes[i] = &Stake{ Owner: stake.Owner, diff --git a/version/version.go b/version/version.go index 1dcb4df08..41bb4a000 100755 --- a/version/version.go +++ b/version/version.go @@ -11,7 +11,7 @@ const ( var ( // Must be a string because scripts like dist.sh read this file. - Version = "1.1.0-beta10" + Version = "1.1.0-beta11" // GitCommit is the current HEAD set using ldflags. GitCommit string