Skip to content

Commit

Permalink
feat: export peers field from PeerSampler
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvis339 committed Feb 26, 2025
1 parent dd47862 commit 68781fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions network/p2p/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (n *Network) NewClient(handlerID uint64, options ...ClientOption) *Client {
router: n.router,
options: &clientOptions{
nodeSampler: &PeerSampler{
peers: n.Peers,
Peers: n.Peers,
},
},
}
Expand Down Expand Up @@ -199,11 +199,11 @@ func (p *Peers) Sample(limit int) []ids.NodeID {

// PeerSampler implements NodeSampler
type PeerSampler struct {
peers *Peers
Peers *Peers
}

func (p PeerSampler) Sample(_ context.Context, limit int) []ids.NodeID {
return p.peers.Sample(limit)
return p.Peers.Sample(limit)
}

func ProtocolPrefix(handlerID uint64) []byte {
Expand Down

0 comments on commit 68781fb

Please sign in to comment.