rpc: use minimal mode by default
This commit is contained in:
committed by
Trent Nelson
parent
fb0e71946f
commit
eac4a6df68
@ -87,7 +87,10 @@ fn test_local_cluster_start_and_exit_with_config() {
|
||||
solana_logger::setup();
|
||||
const NUM_NODES: usize = 1;
|
||||
let mut config = ClusterConfig {
|
||||
validator_configs: make_identical_validator_configs(&ValidatorConfig::default(), NUM_NODES),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default_for_test(),
|
||||
NUM_NODES,
|
||||
),
|
||||
node_stakes: vec![3; NUM_NODES],
|
||||
cluster_lamports: 100,
|
||||
ticks_per_slot: 8,
|
||||
@ -107,7 +110,7 @@ fn test_ledger_cleanup_service() {
|
||||
let num_nodes = 3;
|
||||
let validator_config = ValidatorConfig {
|
||||
max_ledger_shreds: Some(100),
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
let mut config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
@ -293,7 +296,7 @@ fn test_leader_failure_4() {
|
||||
solana_logger::setup_with_default(RUST_LOG_FILTER);
|
||||
error!("test_leader_failure_4");
|
||||
let num_nodes = 4;
|
||||
let validator_config = ValidatorConfig::default();
|
||||
let validator_config = ValidatorConfig::default_for_test();
|
||||
let mut config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
node_stakes: vec![100; 4],
|
||||
@ -384,7 +387,7 @@ fn test_cluster_partition_1_1_1() {
|
||||
fn test_two_unbalanced_stakes() {
|
||||
solana_logger::setup_with_default(RUST_LOG_FILTER);
|
||||
error!("test_two_unbalanced_stakes");
|
||||
let validator_config = ValidatorConfig::default();
|
||||
let validator_config = ValidatorConfig::default_for_test();
|
||||
let num_ticks_per_second = 100;
|
||||
let num_ticks_per_slot = 10;
|
||||
let num_slots_per_epoch = MINIMUM_SLOTS_PER_EPOCH as u64;
|
||||
@ -423,7 +426,10 @@ fn test_forwarding() {
|
||||
let mut config = ClusterConfig {
|
||||
node_stakes: vec![999_990, 3],
|
||||
cluster_lamports: 2_000_000,
|
||||
validator_configs: make_identical_validator_configs(&ValidatorConfig::default(), 2),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default_for_test(),
|
||||
2,
|
||||
),
|
||||
..ClusterConfig::default()
|
||||
};
|
||||
let cluster = LocalCluster::new(&mut config, SocketAddrSpace::Unspecified);
|
||||
@ -454,7 +460,7 @@ fn test_restart_node() {
|
||||
error!("test_restart_node");
|
||||
let slots_per_epoch = MINIMUM_SLOTS_PER_EPOCH * 2;
|
||||
let ticks_per_slot = 16;
|
||||
let validator_config = ValidatorConfig::default();
|
||||
let validator_config = ValidatorConfig::default_for_test();
|
||||
let mut cluster = LocalCluster::new(
|
||||
&mut ClusterConfig {
|
||||
node_stakes: vec![100; 1],
|
||||
@ -498,7 +504,10 @@ fn test_mainnet_beta_cluster_type() {
|
||||
cluster_type: ClusterType::MainnetBeta,
|
||||
node_stakes: vec![100; 1],
|
||||
cluster_lamports: 1_000,
|
||||
validator_configs: make_identical_validator_configs(&ValidatorConfig::default(), 1),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default_for_test(),
|
||||
1,
|
||||
),
|
||||
..ClusterConfig::default()
|
||||
};
|
||||
let cluster = LocalCluster::new(&mut config, SocketAddrSpace::Unspecified);
|
||||
@ -1577,7 +1586,7 @@ fn test_fake_shreds_broadcast_leader() {
|
||||
#[test]
|
||||
fn test_wait_for_max_stake() {
|
||||
solana_logger::setup_with_default(RUST_LOG_FILTER);
|
||||
let validator_config = ValidatorConfig::default();
|
||||
let validator_config = ValidatorConfig::default_for_test();
|
||||
let mut config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
node_stakes: vec![100; 4],
|
||||
@ -1600,7 +1609,7 @@ fn test_no_voting() {
|
||||
solana_logger::setup_with_default(RUST_LOG_FILTER);
|
||||
let validator_config = ValidatorConfig {
|
||||
voting_disabled: true,
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
let mut config = ClusterConfig {
|
||||
cluster_lamports: 10_000,
|
||||
@ -1653,7 +1662,7 @@ fn test_optimistic_confirmation_violation_detection() {
|
||||
cluster_lamports: 100_000,
|
||||
node_stakes: node_stakes.clone(),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default(),
|
||||
&ValidatorConfig::default_for_test(),
|
||||
node_stakes.len(),
|
||||
),
|
||||
validator_keys: Some(validator_keys),
|
||||
@ -1774,7 +1783,7 @@ fn test_validator_saves_tower() {
|
||||
|
||||
let validator_config = ValidatorConfig {
|
||||
require_tower: true,
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
let validator_identity_keypair = Arc::new(Keypair::new());
|
||||
let validator_id = validator_identity_keypair.pubkey();
|
||||
@ -1968,7 +1977,7 @@ fn test_slot_hash_expiry() {
|
||||
// We want B to not vote (we are trying to simulate its votes not landing until it gets to the
|
||||
// minority fork)
|
||||
let mut validator_configs =
|
||||
make_identical_validator_configs(&ValidatorConfig::default(), node_stakes.len());
|
||||
make_identical_validator_configs(&ValidatorConfig::default_for_test(), node_stakes.len());
|
||||
validator_configs[1].voting_disabled = true;
|
||||
|
||||
let mut config = ClusterConfig {
|
||||
@ -2149,7 +2158,7 @@ fn do_test_future_tower(cluster_mode: ClusterMode) {
|
||||
cluster_lamports: 100_000,
|
||||
node_stakes: node_stakes.clone(),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default(),
|
||||
&ValidatorConfig::default_for_test(),
|
||||
node_stakes.len(),
|
||||
),
|
||||
validator_keys: Some(validator_keys),
|
||||
@ -2260,7 +2269,7 @@ fn test_hard_fork_invalidates_tower() {
|
||||
cluster_lamports: 100_000,
|
||||
node_stakes: node_stakes.clone(),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default(),
|
||||
&ValidatorConfig::default_for_test(),
|
||||
node_stakes.len(),
|
||||
),
|
||||
validator_keys: Some(validator_keys),
|
||||
@ -2392,7 +2401,7 @@ fn test_restart_tower_rollback() {
|
||||
cluster_lamports: 100_000,
|
||||
node_stakes: node_stakes.clone(),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default(),
|
||||
&ValidatorConfig::default_for_test(),
|
||||
node_stakes.len(),
|
||||
),
|
||||
validator_keys: Some(validator_keys),
|
||||
@ -2758,7 +2767,7 @@ fn run_test_load_program_accounts(scan_commitment: CommitmentConfig) {
|
||||
cluster_lamports: 100_000,
|
||||
node_stakes: node_stakes.clone(),
|
||||
validator_configs: make_identical_validator_configs(
|
||||
&ValidatorConfig::default(),
|
||||
&ValidatorConfig::default_for_test(),
|
||||
node_stakes.len(),
|
||||
),
|
||||
validator_keys: Some(validator_keys),
|
||||
@ -2861,7 +2870,7 @@ impl SnapshotValidatorConfig {
|
||||
snapshot_config: Some(snapshot_config),
|
||||
account_paths: account_storage_paths,
|
||||
accounts_hash_interval_slots,
|
||||
..ValidatorConfig::default()
|
||||
..ValidatorConfig::default_for_test()
|
||||
};
|
||||
|
||||
SnapshotValidatorConfig {
|
||||
|
Reference in New Issue
Block a user