Commit Graph

10 Commits

Author SHA1 Message Date
Elle Mouton
f6c41565d1 accessman: fix structured logging formatting 2025-07-01 20:09:07 +02:00
yyforyongyu
da13c7ab66 lnd: remove peer from peerChanInfo when necessary
We now remove the peer from `peerChanInfo` if this peer doesn't have
channels with us. Also patched a unit test for `removePeerAccess`.
2025-06-20 15:50:45 -07:00
yyforyongyu
ceeb123925 channeldb+lnd: rename peerCounts to peerChanInfo for clarity 2025-06-20 15:50:45 -07:00
yyforyongyu
107b74d81d accessman+lnd: rename checkIncomingConnBanScore for clarity 2025-06-20 15:50:45 -07:00
yyforyongyu
0b0513d88c accessman: make sure to decrement PendingOpenCount 2025-06-20 15:50:25 -07:00
yyforyongyu
d9e3412ed5 accessman: skip incrementing num of slots for existing peer
When a peer is already existing, we should skip incrementing the
`numRestricted` count.

Also patched unit test for method `addPeerAccess`.
2025-06-20 15:50:25 -07:00
yyforyongyu
bd99924383 lnd: only restrict slots for inbound connections
For outbound connections, since they are initialized by the users, we
can relax on the restriction. A future global limit may be added - as
for now, we will let them to be managed by the users.
2025-06-20 15:50:25 -07:00
yyforyongyu
b527f19de7 accessman: skip restriction for existing peers
When a peer already has a connection with us, there's no need to check
for available slots as we will either close the old conn or refuse the
new conn.
2025-06-20 15:50:25 -07:00
yyforyongyu
643b1c8af7 accessman: patch unit tests 2025-06-04 12:22:11 +02:00
Eugene Siegel
6eb746fbba server.go+accessman.go: introduce caches for access permissions
Here we introduce the access manager which has caches that will
determine the access control status of our peers. Peers that have
had their funding transaction confirm with us are protected. Peers
that only have pending-open channels with us are temporary access
and can have their access revoked. The rest of the peers are granted
restricted access.
2025-03-11 20:42:34 -04:00