RPC: Limit request payload size to 50kB (#12287)

(cherry picked from commit 32dcce0ac1)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2020-09-16 21:26:31 +00:00
committed by GitHub
parent 19eb73d645
commit f00c504555
3 changed files with 5 additions and 1 deletions

View File

@@ -79,6 +79,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 }