feat: add analyze-storage command to ledger-tool (#7165)
This commit is contained in:
@ -148,6 +148,10 @@ impl BlocktreeInsertionMetrics {
|
||||
}
|
||||
|
||||
impl Blocktree {
|
||||
pub fn db(self) -> Arc<Database> {
|
||||
self.db
|
||||
}
|
||||
|
||||
/// Opens a Ledger in directory, provides "infinite" window of shreds
|
||||
pub fn open(ledger_path: &Path) -> Result<Blocktree> {
|
||||
fs::create_dir_all(&ledger_path)?;
|
||||
|
@ -228,6 +228,10 @@ pub trait Column {
|
||||
const NAME: &'static str;
|
||||
type Index;
|
||||
|
||||
fn key_size() -> usize {
|
||||
std::mem::size_of::<Self::Index>()
|
||||
}
|
||||
|
||||
fn key(index: Self::Index) -> Vec<u8>;
|
||||
fn index(key: &[u8]) -> Self::Index;
|
||||
fn slot(index: Self::Index) -> Slot;
|
||||
|
@ -3,7 +3,7 @@ pub mod bank_forks_utils;
|
||||
pub mod block_error;
|
||||
#[macro_use]
|
||||
pub mod blocktree;
|
||||
mod blocktree_db;
|
||||
pub mod blocktree_db;
|
||||
mod blocktree_meta;
|
||||
pub mod blocktree_processor;
|
||||
pub mod entry;
|
||||
|
Reference in New Issue
Block a user