rename autorelay.WithNumCandidates to WithMaxCandidates
This commit is contained in:
parent
7e767cbc22
commit
98f46f2e84
|
@ -109,7 +109,7 @@ func TestSingleRelay(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
h := newPrivateNode(t,
|
h := newPrivateNode(t,
|
||||||
autorelay.WithPeerSource(peerChan),
|
autorelay.WithPeerSource(peerChan),
|
||||||
autorelay.WithNumCandidates(1),
|
autorelay.WithMaxCandidates(1),
|
||||||
autorelay.WithNumRelays(99999),
|
autorelay.WithNumRelays(99999),
|
||||||
autorelay.WithBootDelay(0),
|
autorelay.WithBootDelay(0),
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,7 +13,7 @@ type config struct {
|
||||||
staticRelays []peer.AddrInfo
|
staticRelays []peer.AddrInfo
|
||||||
// see WithMinCandidates
|
// see WithMinCandidates
|
||||||
minCandidates int
|
minCandidates int
|
||||||
// see WithNumCandidates
|
// see WithMaxCandidates
|
||||||
maxCandidates int
|
maxCandidates int
|
||||||
// Delay until we obtain reservations with relays, if we have less than minCandidates candidates.
|
// Delay until we obtain reservations with relays, if we have less than minCandidates candidates.
|
||||||
// See WithBootDelay.
|
// See WithBootDelay.
|
||||||
|
@ -88,8 +88,8 @@ func WithNumRelays(n int) Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithNumCandidates sets the number of relay candidates that we buffer.
|
// WithMaxCandidates sets the number of relay candidates that we buffer.
|
||||||
func WithNumCandidates(n int) Option {
|
func WithMaxCandidates(n int) Option {
|
||||||
return func(c *config) error {
|
return func(c *config) error {
|
||||||
c.maxCandidates = n
|
c.maxCandidates = n
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue