* rpc: use minimal mode by default
(cherry picked from commit eac4a6df68
)
# Conflicts:
# core/src/validator.rs
# local-cluster/tests/common.rs
# local-cluster/tests/local_cluster.rs
# replica-node/tests/local_replica.rs
# rpc/src/rpc_service.rs
# transaction-dos/src/main.rs
* test-validator-bin: reinstate full rpc method set
Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
@@ -144,11 +144,20 @@ pub struct JsonRpcConfig {
|
||||
pub rpc_threads: usize,
|
||||
pub rpc_niceness_adj: i8,
|
||||
pub rpc_bigtable_timeout: Option<Duration>,
|
||||
pub minimal_api: bool,
|
||||
pub full_api: bool,
|
||||
pub obsolete_v1_7_api: bool,
|
||||
pub rpc_scan_and_fix_roots: bool,
|
||||
}
|
||||
|
||||
impl JsonRpcConfig {
|
||||
pub fn default_for_test() -> Self {
|
||||
Self {
|
||||
full_api: true,
|
||||
..Self::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct JsonRpcRequestProcessor {
|
||||
bank_forks: Arc<RwLock<BankForks>>,
|
||||
|
@@ -363,7 +363,7 @@ impl JsonRpcService {
|
||||
(None, None)
|
||||
};
|
||||
|
||||
let minimal_api = config.minimal_api;
|
||||
let full_api = config.full_api;
|
||||
let obsolete_v1_7_api = config.obsolete_v1_7_api;
|
||||
let (request_processor, receiver) = JsonRpcRequestProcessor::new(
|
||||
config,
|
||||
@@ -407,7 +407,7 @@ impl JsonRpcService {
|
||||
let mut io = MetaIoHandler::default();
|
||||
|
||||
io.extend_with(rpc_minimal::MinimalImpl.to_delegate());
|
||||
if !minimal_api {
|
||||
if full_api {
|
||||
io.extend_with(rpc_full::FullImpl.to_delegate());
|
||||
io.extend_with(rpc_deprecated_v1_7::DeprecatedV1_7Impl.to_delegate());
|
||||
}
|
||||
|
Reference in New Issue
Block a user