From 78498fbd88198ae809e7dc21e65cab021e39e2bc Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Mon, 13 Jun 2022 16:29:28 -0700 Subject: [PATCH] Add comment --- allowlist.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/allowlist.go b/allowlist.go index 9d4e7ab..325b7fe 100644 --- a/allowlist.go +++ b/allowlist.go @@ -11,7 +11,10 @@ import ( ) 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 allowedNetworks []*net.IPNet