mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-21 14:14:30 +00:00
fix topCandidates in function GetCandidates
This commit is contained in:
parent
3214bbeeba
commit
7dc5ffe45a
1 changed files with 2 additions and 2 deletions
|
|
@ -954,8 +954,8 @@ func (s *PublicBlockChainAPI) GetCandidates(ctx context.Context, epoch rpc.Epoch
|
|||
penaltyList = common.ExtractAddressFromBytes(penalties)
|
||||
|
||||
var topCandidates []utils.Masternode
|
||||
if len(candidates) > common.MaxMasternodes {
|
||||
topCandidates = candidates[:common.MaxMasternodes]
|
||||
if len(candidates) > maxMasternodes {
|
||||
topCandidates = candidates[:maxMasternodes]
|
||||
} else {
|
||||
topCandidates = candidates
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue