* rpc: use minimal mode by default
(cherry picked from commit eac4a6df68
)
# Conflicts:
# local-cluster/tests/local_cluster.rs
* test-validator-bin: reinstate full rpc method set
Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
@ -228,6 +228,15 @@ impl Default for ValidatorConfig {
|
||||
}
|
||||
}
|
||||
|
||||
impl ValidatorConfig {
|
||||
pub fn default_for_test() -> Self {
|
||||
Self {
|
||||
rpc_config: JsonRpcConfig::default_for_test(),
|
||||
..Self::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// `ValidatorStartProgress` contains status information that is surfaced to the node operator over
|
||||
// the admin RPC channel to help them to follow the general progress of node startup without
|
||||
// having to watch log messages.
|
||||
@ -653,7 +662,7 @@ impl Validator {
|
||||
leader_schedule_cache.clone(),
|
||||
max_complete_transaction_status_slot,
|
||||
)),
|
||||
if config.rpc_config.minimal_api {
|
||||
if !config.rpc_config.full_api {
|
||||
None
|
||||
} else {
|
||||
let (trigger, pubsub_service) = PubSubService::new(
|
||||
@ -1775,7 +1784,7 @@ mod tests {
|
||||
let voting_keypair = Arc::new(Keypair::new());
|
||||
let config = ValidatorConfig {
|
||||
rpc_addrs: Some((validator_node.info.rpc, validator_node.info.rpc_pubsub)),
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
let start_progress = Arc::new(RwLock::new(ValidatorStartProgress::default()));
|
||||
let validator = Validator::new(
|
||||
@ -1857,7 +1866,7 @@ mod tests {
|
||||
let vote_account_keypair = Keypair::new();
|
||||
let config = ValidatorConfig {
|
||||
rpc_addrs: Some((validator_node.info.rpc, validator_node.info.rpc_pubsub)),
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
Validator::new(
|
||||
validator_node,
|
||||
@ -1900,7 +1909,7 @@ mod tests {
|
||||
|
||||
let (genesis_config, _mint_keypair) = create_genesis_config(1);
|
||||
let bank = Arc::new(Bank::new_for_tests(&genesis_config));
|
||||
let mut config = ValidatorConfig::default();
|
||||
let mut config = ValidatorConfig::default_for_test();
|
||||
let rpc_override_health_check = Arc::new(AtomicBool::new(false));
|
||||
let start_progress = Arc::new(RwLock::new(ValidatorStartProgress::default()));
|
||||
|
||||
|
Reference in New Issue
Block a user