note on preventing abuse [ci skip]

This commit is contained in:
Anton Kaliaev 2017-01-17 22:30:03 +04:00
parent 52d9cf080e
commit 324293f4cb
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,18 @@ const (
// adequate number of peers are connected to the switch.
//
// It uses `AddrBook` (address book) to store `NetAddress`es of the peers.
//
// ## Preventing abuse
//
// For now, it just limits the number of messages from one peer to
// `defaultMaxMsgCountByPeer` messages per `msgCountByPeerFlushInterval` (1000
// msg/hour).
//
// NOTE [2017-01-17]:
// Limiting is fine for now. Maybe down the road we want to keep track of the
// quality of peer messages so if peerA keeps telling us about peers we can't
// connect to then maybe we should care less about peerA. But I don't think
// that kind of complexity is priority right now.
type PEXReactor struct {
BaseReactor