connectionGater supports banning peer by its IP address.
connectionGater doesn't support anymore banning peer by its ID (it's not needed).
New BlockPeer function was created and exposed to the rest of the engine.
All function calls ApplyPenalty(peerID, MaxPenaltyScore) were replaced with BlockPeer(peerID).
BlockPeer was renamed to BanPeer to be consistent with the naming in the code (block means permanently block a peer until it's unblocked manually in the code, ban means block a peer for a predefined time interval and then unblock it automatically without user intervention).
How was it tested?
New unit test was implemented.
Existing unit tests were modified to follow all new changes.
What was the problem?
How was it solved?
connectionGater
supports banning peer by its IP address.connectionGater
doesn't support anymore banning peer by its ID (it's not needed).BlockPeer
function was created and exposed to the rest of theengine
.ApplyPenalty(peerID, MaxPenaltyScore)
were replaced withBlockPeer(peerID)
.BlockPeer
was renamed toBanPeer
to be consistent with the naming in the code (block
means permanently block a peer until it's unblocked manually in the code,ban
means block a peer for a predefined time interval and then unblock it automatically without user intervention).How was it tested?