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:
@@ -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 }
|
||||
|
Reference in New Issue
Block a user