Browse Source

note on preventing abuse [ci skip]

pull/456/head
Anton Kaliaev 8 years ago
parent
commit
324293f4cb
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      pex_reactor.go

+ 12
- 0
pex_reactor.go 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


Loading…
Cancel
Save