add rate limiting to outbound p2p msg sending (#3560)
treat peers as abusive based on incoming msgs, not outgoing msg rates
This commit is contained in:
@@ -240,8 +240,8 @@ impl PeerStats {
|
||||
height: peer.info.height(),
|
||||
direction: direction.to_string(),
|
||||
last_seen: peer.info.last_seen(),
|
||||
sent_bytes_per_sec: peer.last_min_sent_bytes().unwrap_or(0) / 60,
|
||||
received_bytes_per_sec: peer.last_min_received_bytes().unwrap_or(0) / 60,
|
||||
sent_bytes_per_sec: peer.tracker().sent_bytes.read().bytes_per_min() / 60,
|
||||
received_bytes_per_sec: peer.tracker().received_bytes.read().bytes_per_min() / 60,
|
||||
capabilities: peer.info.capabilities,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user