fix: use saturating mul for max response size bytes (#5377)

This commit is contained in:
Matthias Seitz
2023-11-10 12:39:30 +01:00
committed by GitHub
parent 40db0dfc9a
commit e26bc17531

View File

@@ -350,11 +350,11 @@ impl RethRpcConfig for RpcServerArgs {
}
fn rpc_max_request_size_bytes(&self) -> u32 {
self.rpc_max_request_size * 1024 * 1024
self.rpc_max_request_size.saturating_mul(1024 * 1024)
}
fn rpc_max_response_size_bytes(&self) -> u32 {
self.rpc_max_response_size * 1024 * 1024
self.rpc_max_response_size.saturating_mul(1024 * 1024)
}
fn gas_price_oracle_config(&self) -> GasPriceOracleConfig {