mirror of
https://github.com/libp2p/go-libp2p-resource-manager.git
synced 2025-03-11 01:30:40 +08:00
Add comment
This commit is contained in:
parent
23ec39d74e
commit
78498fbd88
@ -11,7 +11,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type allowlist struct {
|
type allowlist struct {
|
||||||
// TODO do we want to make this lookup faster?
|
// a simple structure of lists of networks. There is probably a faster way
|
||||||
|
// to check if an IP address is in this network than iterating over this
|
||||||
|
// list, but this is good enough for small numbers of networks (<1_000).
|
||||||
|
// Analyze the benchmark before trying to optimize this.
|
||||||
|
|
||||||
// Any peer with these IPs are allowed
|
// Any peer with these IPs are allowed
|
||||||
allowedNetworks []*net.IPNet
|
allowedNetworks []*net.IPNet
|
||||||
|
Loading…
Reference in New Issue
Block a user