From b35e17cb0c4e7b8f98f1fa3a932cd90dd8bff644 Mon Sep 17 00:00:00 2001 From: cosming <57103958+cosmingamanusi@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:50:56 +0300 Subject: [PATCH] Add --enable-bigtable-ledger-upload Support to solana-test-validator (#1048) * solana-test-validator : add support for enable-bigtable-ledger-upload * solana-test-validator : added 'hidden unless forced' to enable-bigtable-ledger-upload parameter --- validator/src/bin/solana-test-validator.rs | 6 ++++-- validator/src/cli.rs | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/validator/src/bin/solana-test-validator.rs b/validator/src/bin/solana-test-validator.rs index 68e6bcca4fd96f..580a6a14027518 100644 --- a/validator/src/bin/solana-test-validator.rs +++ b/validator/src/bin/solana-test-validator.rs @@ -423,9 +423,11 @@ fn main() { None }; - let rpc_bigtable_config = if matches.is_present("enable_rpc_bigtable_ledger_storage") { + let rpc_bigtable_config = if matches.is_present("enable_rpc_bigtable_ledger_storage") + || matches.is_present("enable_bigtable_ledger_upload") + { Some(RpcBigtableConfig { - enable_bigtable_ledger_upload: false, + enable_bigtable_ledger_upload: matches.is_present("enable_bigtable_ledger_upload"), bigtable_instance_name: value_t_or_exit!(matches, "rpc_bigtable_instance", String), bigtable_app_profile_id: value_t_or_exit!( matches, diff --git a/validator/src/cli.rs b/validator/src/cli.rs index 0eed324a9a9d0c..d3ac2b4c5a4dfb 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -2454,6 +2454,13 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App< local ledger data", ), ) + .arg( + Arg::with_name("enable_bigtable_ledger_upload") + .long("enable-bigtable-ledger-upload") + .takes_value(false) + .hidden(hidden_unless_forced()) + .help("Upload new confirmed blocks into a BigTable instance"), + ) .arg( Arg::with_name("rpc_bigtable_instance") .long("rpc-bigtable-instance")