Skip to content

Commit b9e0bec

Browse files
incorporate PR feedback
Co-authored-by: Marten Seemann <[email protected]>
1 parent d078a46 commit b9e0bec

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

p2p/protocol/holepunch/filter.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
ma "github.com/multiformats/go-multiaddr"
66
)
77

8-
// WithAddrFilter is a Service option that enables multi address filtering.
9-
// It allows to only allow a subset of observed addresses to the remote
8+
// WithAddrFilter is a Service option that enables multiaddress filtering.
9+
// It allows to only send a subset of observed addresses to the remote
1010
// peer. E.g., only announce TCP or QUIC multi addresses instead of both.
1111
// It also allows to only consider a subset of received multi addresses
1212
// that remote peers announced to us.
@@ -19,12 +19,10 @@ func WithAddrFilter(maf AddrFilter) Option {
1919
}
2020

2121
// AddrFilter defines the interface for the multi address filtering.
22-
// - FilterLocal is a function that filters the multi addresses that
23-
// we send to the remote peer.
24-
// - FilterRemote is a function that filters the multi addresses which
25-
// we received from the remote peer.
2622
type AddrFilter interface {
23+
// FilterLocal is a function that filters the multi addresses that we send to the remote peer.
2724
FilterLocal(remoteID peer.ID, maddrs []ma.Multiaddr) []ma.Multiaddr
25+
// FilterRemote is a function that filters the multi addresses which we received from the remote peer.
2826
FilterRemote(remoteID peer.ID, maddrs []ma.Multiaddr) []ma.Multiaddr
2927
}
3028

0 commit comments

Comments
 (0)