mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +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)
|
penaltyList = common.ExtractAddressFromBytes(penalties)
|
||||||
|
|
||||||
var topCandidates []utils.Masternode
|
var topCandidates []utils.Masternode
|
||||||
if len(candidates) > common.MaxMasternodes {
|
if len(candidates) > maxMasternodes {
|
||||||
topCandidates = candidates[:common.MaxMasternodes]
|
topCandidates = candidates[:maxMasternodes]
|
||||||
} else {
|
} else {
|
||||||
topCandidates = candidates
|
topCandidates = candidates
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue