Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pub struct TestValidatorGenesis {
pub authorized_voter_keypairs: Arc<RwLock<Vec<Arc<Keypair>>>>,
pub max_ledger_shreds: Option<u64>,
pub max_genesis_archive_unpacked_size: Option<u64>,
pub accountsdb_plugin_config_files: Option<Vec<PathBuf>>,
}

impl TestValidatorGenesis {
Expand Down Expand Up @@ -510,6 +511,7 @@ impl TestValidator {
}

let mut validator_config = ValidatorConfig {
accountsdb_plugin_config_files: config.accountsdb_plugin_config_files.clone(),
rpc_addrs: Some((
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), node.info.rpc.port()),
SocketAddr::new(
Expand Down
20 changes: 19 additions & 1 deletion validator/src/bin/solana-test-validator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
clap::{crate_name, value_t, value_t_or_exit, App, Arg},
clap::{crate_name, value_t, value_t_or_exit, values_t_or_exit, App, Arg},
log::*,
solana_clap_utils::{
input_parsers::{pubkey_of, pubkeys_of, value_of},
Expand Down Expand Up @@ -282,6 +282,15 @@ fn main() {
If the ledger already exists then this parameter is silently ignored",
),
)
.arg(
Arg::with_name("accountsdb_plugin_config")
.long("accountsdb-plugin-config")
.value_name("FILE")
.takes_value(true)
.multiple(true)
.hidden(true)
.help("Specify the configuration file for the AccountsDb plugin."),
)
.get_matches();

let output = if matches.is_present("quiet") {
Expand Down Expand Up @@ -596,6 +605,15 @@ fn main() {
genesis.bind_ip_addr(bind_address);
}

if matches.is_present("accountsdb_plugin_config") {
genesis.accountsdb_plugin_config_files = Some(
values_t_or_exit!(matches, "accountsdb_plugin_config", String)
.into_iter()
.map(PathBuf::from)
.collect(),
);
}

match genesis.start_with_mint_address(mint_address, socket_addr_space) {
Ok(test_validator) => {
*admin_service_cluster_info.write().unwrap() = Some(test_validator.cluster_info());
Expand Down