fix rate limits, and a couple other bugs

This commit is contained in:
realbigsean
2022-12-20 18:56:07 -05:00
parent 7d5db8015d
commit 9c46a1cb21
5 changed files with 30 additions and 13 deletions

View File

@@ -298,8 +298,8 @@ impl<TSpec: EthSpec> Decoder for SSZSnappyOutboundCodec<TSpec> {
.rpc_response_limits::<TSpec>(&self.fork_context);
if ssz_limits.is_out_of_bounds(length, self.max_packet_size) {
return Err(RPCError::InvalidData(format!(
"RPC response length is out of bounds, length {}",
length
"RPC response length is out of bounds, length {}, max {}, min {}",
length, ssz_limits.max, ssz_limits.min
)));
}
// Calculate worst case compression length for given uncompressed length