Skip to content

Commit

Permalink
Revert "Ledger-tool: only require ledger dir when necessary (backport s…
Browse files Browse the repository at this point in the history
  • Loading branch information
t-nelson committed Dec 13, 2021
1 parent f807c45 commit fbdf576
Show file tree
Hide file tree
Showing 3 changed files with 1,442 additions and 1,496 deletions.
48 changes: 21 additions & 27 deletions ledger-tool/src/bigtable.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
/// The `bigtable` subcommand
use {
crate::ledger_path::canonicalize_ledger_path,
clap::{
value_t, value_t_or_exit, values_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand,
},
solana_clap_utils::{
input_parsers::pubkey_of,
input_validators::{is_slot, is_valid_pubkey},
},
solana_cli_output::{
display::println_transaction, CliBlock, CliTransaction, CliTransactionConfirmation,
OutputFormat,
},
solana_ledger::{blockstore::Blockstore, blockstore_db::AccessType},
solana_sdk::{clock::Slot, pubkey::Pubkey, signature::Signature},
solana_transaction_status::{ConfirmedBlock, EncodedTransaction, UiTransactionEncoding},
std::{
path::Path,
process::exit,
result::Result,
sync::{atomic::AtomicBool, Arc},
},
use clap::{
value_t, value_t_or_exit, values_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand,
};
use solana_clap_utils::{
input_parsers::pubkey_of,
input_validators::{is_slot, is_valid_pubkey},
};
use solana_cli_output::{
display::println_transaction, CliBlock, CliTransaction, CliTransactionConfirmation,
OutputFormat,
};
use solana_ledger::{blockstore::Blockstore, blockstore_db::AccessType};
use solana_sdk::{clock::Slot, pubkey::Pubkey, signature::Signature};
use solana_transaction_status::{ConfirmedBlock, EncodedTransaction, UiTransactionEncoding};
use std::{
path::Path,
process::exit,
result::Result,
sync::{atomic::AtomicBool, Arc},
};

async fn upload(
Expand Down Expand Up @@ -429,11 +426,8 @@ pub fn bigtable_process_command(ledger_path: &Path, matches: &ArgMatches<'_>) {
let ending_slot = value_t!(arg_matches, "ending_slot", Slot).ok();
let allow_missing_metadata = arg_matches.is_present("allow_missing_metadata");
let force_reupload = arg_matches.is_present("force_reupload");
let blockstore = crate::open_blockstore(
&canonicalize_ledger_path(ledger_path),
AccessType::TryPrimaryThenSecondary,
None,
);
let blockstore =
crate::open_blockstore(ledger_path, AccessType::TryPrimaryThenSecondary, None);

runtime.block_on(upload(
blockstore,
Expand Down
30 changes: 0 additions & 30 deletions ledger-tool/src/ledger_path.rs

This file was deleted.

Loading

0 comments on commit fbdf576

Please sign in to comment.