RPC: Limit request payload size to 50kB

This commit is contained in:
Trent Nelson
2020-09-16 12:50:43 -06:00
committed by mergify[bot]
parent f6cda2579f
commit 32dcce0ac1
3 changed files with 5 additions and 1 deletions

View File

@@ -78,6 +78,8 @@ use std::{
};
use tokio::runtime;
pub const MAX_REQUEST_PAYLOAD_SIZE: usize = 50 * (1 << 10); // 50kB
fn new_response<T>(bank: &Bank, value: T) -> RpcResponse<T> {
let context = RpcResponseContext { slot: bank.slot() };
Response { context, value }