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
2025-05-31 03:23:23 +08:00
parent 836b527a4e
commit 124aabcdb7
2 changed files with 40 additions and 25 deletions

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 {