Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup unused data_file_path #2766

Merged
merged 1 commit into from
Apr 22, 2019
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
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