aergoio/aergo

View on GitHub
p2p/rolemanager.go

Summary

Maintainability
A
35 mins
Test Coverage
D
60%

Method DPOSRoleManager.loadBPVotes has 5 return statements (exceeds 4 allowed).
Open

func (rm *DPOSRoleManager) loadBPVotes() (map[types.PeerID]voteRank, []types.PeerID, error) {
    bpCount := len(rm.is.ConsensusAccessor().ConsensusInfo().Bps)
    unionCap := bpCount * 2
    result, err := rm.actor.CallRequest(message.ChainSvc,
        &message.GetElected{Id: types.OpvoteBP.ID(), N: uint32(bpCount * 2)}, getVotesMessageTimeout)
Severity: Major
Found in p2p/rolemanager.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status