Skip to content

Commit

Permalink
cleanup unused data_file_path (#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
antiochp authored and ignopeverell committed Apr 22, 2019
1 parent b61b773 commit d7f940e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions core/src/core/pmmr/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,9 @@ pub trait Backend<T: PMMRable> {
/// triggered removal).
fn remove(&mut self, position: u64) -> Result<(), String>;

/// Returns the data file path.. this is a bit of a hack now that doesn't
/// sit well with the design, but TxKernels have to be summed and the
/// fastest way to to be able to allow direct access to the file
fn get_data_file_path(&self) -> &Path;

/// Release underlying datafiles and locks
fn release_files(&mut self);

/// Also a bit of a hack...
/// Saves a snapshot of the rewound utxo file with the block hash as
/// filename suffix. We need this when sending a txhashset zip file to a
/// node for fast sync.
Expand Down
5 changes: 0 additions & 5 deletions core/src/core/pmmr/pmmr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@ where
self.last_pos
}

/// Return the path of the data file (needed to sum kernels efficiently)
pub fn data_file_path(&self) -> &Path {
self.backend.get_data_file_path()
}

/// Debugging utility to print information about the MMRs. Short version
/// only prints the last 8 nodes.
pub fn dump(&self, short: bool) {
Expand Down
4 changes: 0 additions & 4 deletions core/tests/vec_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ impl<T: PMMRable> Backend<T> for VecBackend<T> {
Ok(())
}

fn get_data_file_path(&self) -> &Path {
Path::new("")
}

fn release_files(&mut self) {}

fn dump_stats(&self) {}
Expand Down
5 changes: 0 additions & 5 deletions store/src/pmmr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ impl<T: PMMRable> Backend<T> for PMMRBackend<T> {
Ok(())
}

/// Return data file path
fn get_data_file_path(&self) -> &Path {
self.data_file.path()
}

/// Release underlying data files
fn release_files(&mut self) {
self.data_file.release();
Expand Down

0 comments on commit d7f940e

Please sign in to comment.