Skip to content

Commit

Permalink
chore: define struct inside function
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Feb 7, 2022
1 parent 858a72b commit 55dca9c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dot/peerset/peerstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ func (ps *PeersState) peers() []peer.ID {
return peerIDs
}

type connectedPeerReputation struct {
peerID peer.ID
reputation Reputation
}

// sortedPeers returns the list of peers we are connected to of a specific set.
func (ps *PeersState) sortedPeers(idx int) peer.IDSlice {
ps.peerStateRWMutex.RLock()
Expand All @@ -194,6 +189,11 @@ func (ps *PeersState) sortedPeers(idx int) peer.IDSlice {
return nil
}

type connectedPeerReputation struct {
peerID peer.ID
reputation Reputation
}

connectedPeersReps := make([]connectedPeerReputation, 0)

for peerID, node := range ps.nodes {
Expand Down

0 comments on commit 55dca9c

Please sign in to comment.