accessman+lnd: check if a peer is found in peerScores

We need to also check this map to make sure the peer exists or not.
This commit is contained in:
yyforyongyu committed 2025-06-18 17:19:09 +08:00
1 parent 836b527a4e
commit 124aabcdb7
2 files changed
+40 -25

No files matched your search

+2
View File
@@ -1889,6 +1889,8 @@ func newServer(_ context.Context, cfg *Config, listenAddrs []net.Addr,
// connection requests when we call NewListener.
listeners[i], err = brontide.NewListener(
nodeKeyECDH, listenAddr.String(),
// TODO(yy): remove this check and unify the inbound
// connection check inside `InboundPeerConnected`.
s.peerAccessMan.checkIncomingConnBanScore,
)
if err != nil {