You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an attempt to remove code from server.go and from the serverPeer struct specifically, I think it makes sense to move addBanScore from serverPeer to a public method IncreaseBanScore on peer.Peer. Furthermore, we should move dynamicbanscore.go and the associated test from the connmgr package to the peer package.
Thoughts on this?
The text was updated successfully, but these errors were encountered:
I'm not really sure on this one. It seems to me like banning is very much a connection management related issue. I suspect the bigger issue, which is something I've commented on before, is that more of the connection-related logic should move into connection manager.
More specifically, it seems to me like the code that handles maintaining persistent peers, adding peers, removing peers, banning peers, and querying of the state of connections, should all be refactored from the server to the connection manager. Of course we want to be careful to ensure the connection manager remains usable by more than btcd's server though since it is highly useful code for other things such as SPV wallets as well.
The reason it is sort of split is that originally everything was in server and the connmanager package was created to help refactor some of that code out. I think the real driving issue you're running into here is simply that the connmanager isn't handling all of the connections as it name implies.
In an attempt to remove code from
server.go
and from theserverPeer
struct specifically, I think it makes sense to moveaddBanScore
fromserverPeer
to a public methodIncreaseBanScore
onpeer.Peer
. Furthermore, we should movedynamicbanscore.go
and the associated test from theconnmgr
package to thepeer
package.Thoughts on this?
The text was updated successfully, but these errors were encountered: