mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Downgrade rate limited log (#5381)
* Address review comments * Downgrade log for by_root requests
This commit is contained in:
@@ -310,11 +310,16 @@ where
|
||||
Err(RateLimitedErr::TooLarge) => {
|
||||
// we set the batch sizes, so this is a coding/config err for most protocols
|
||||
let protocol = req.versioned_protocol().protocol();
|
||||
if matches!(protocol, Protocol::BlocksByRange)
|
||||
|| matches!(protocol, Protocol::BlobsByRange)
|
||||
{
|
||||
debug!(self.log, "By range request will never be processed"; "request" => %req, "protocol" => %protocol);
|
||||
if matches!(
|
||||
protocol,
|
||||
Protocol::BlocksByRange
|
||||
| Protocol::BlobsByRange
|
||||
| Protocol::BlocksByRoot
|
||||
| Protocol::BlobsByRoot
|
||||
) {
|
||||
debug!(self.log, "Request too large to process"; "request" => %req, "protocol" => %protocol);
|
||||
} else {
|
||||
// Other protocols shouldn't be sending large messages, we should flag the peer kind
|
||||
crit!(self.log, "Request size too large to ever be processed"; "protocol" => %protocol);
|
||||
}
|
||||
// send an error code to the peer.
|
||||
|
||||
Reference in New Issue
Block a user