rpc: use minimal mode by default
This commit is contained in:
committed by
Trent Nelson
parent
fb0e71946f
commit
eac4a6df68
@ -84,7 +84,6 @@ impl Default for TestValidatorNodeConfig {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct TestValidatorGenesis {
|
||||
fee_rate_governor: FeeRateGovernor,
|
||||
ledger_path: Option<PathBuf>,
|
||||
@ -109,6 +108,37 @@ pub struct TestValidatorGenesis {
|
||||
pub accounts_db_caching_enabled: bool,
|
||||
}
|
||||
|
||||
impl Default for TestValidatorGenesis {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
fee_rate_governor: FeeRateGovernor::default(),
|
||||
ledger_path: Option::<PathBuf>::default(),
|
||||
tower_storage: Option::<Arc<dyn TowerStorage>>::default(),
|
||||
rent: Rent::default(),
|
||||
rpc_config: JsonRpcConfig {
|
||||
full_api: true,
|
||||
..JsonRpcConfig::default()
|
||||
},
|
||||
pubsub_config: PubSubConfig::default(),
|
||||
rpc_ports: Option::<(u16, u16)>::default(),
|
||||
warp_slot: Option::<Slot>::default(),
|
||||
no_bpf_jit: bool::default(),
|
||||
accounts: HashMap::<Pubkey, AccountSharedData>::default(),
|
||||
programs: Vec::<ProgramInfo>::default(),
|
||||
ticks_per_slot: Option::<u64>::default(),
|
||||
epoch_schedule: Option::<EpochSchedule>::default(),
|
||||
node_config: TestValidatorNodeConfig::default(),
|
||||
validator_exit: Arc::<RwLock<Exit>>::default(),
|
||||
start_progress: Arc::<RwLock<ValidatorStartProgress>>::default(),
|
||||
authorized_voter_keypairs: Arc::<RwLock<Vec<Arc<Keypair>>>>::default(),
|
||||
max_ledger_shreds: Option::<u64>::default(),
|
||||
max_genesis_archive_unpacked_size: Option::<u64>::default(),
|
||||
accountsdb_plugin_config_files: Option::<Vec<PathBuf>>::default(),
|
||||
accounts_db_caching_enabled: bool::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TestValidatorGenesis {
|
||||
pub fn ledger_path<P: Into<PathBuf>>(&mut self, ledger_path: P) -> &mut Self {
|
||||
self.ledger_path = Some(ledger_path.into());
|
||||
@ -630,7 +660,7 @@ impl TestValidator {
|
||||
rocksdb_compaction_interval: Some(100), // Compact every 100 slots
|
||||
max_ledger_shreds: config.max_ledger_shreds,
|
||||
no_wait_for_vote_to_start_leader: true,
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
if let Some(ref tower_storage) = config.tower_storage {
|
||||
validator_config.tower_storage = tower_storage.clone();
|
||||
|
Reference in New Issue
Block a user