From 46a7245ec183c7719a2df689ba1c97b461427984 Mon Sep 17 00:00:00 2001 From: Antioch Peverell <30642645+antiochp@users.noreply.github.com> Date: Mon, 23 Apr 2018 20:46:06 -0400 Subject: [PATCH] Cleanup unused fn on rm_log (#999) --- chain/src/store.rs | 1 - store/src/types.rs | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/chain/src/store.rs b/chain/src/store.rs index c116f4d44..2e3f8cb75 100644 --- a/chain/src/store.rs +++ b/chain/src/store.rs @@ -26,7 +26,6 @@ use core::core::{Block, BlockHeader}; use core::consensus::TargetError; use core::core::target::Difficulty; use grin_store::{self, option_to_not_found, to_key, Error, u64_to_key}; -use util::LOGGER; const STORE_SUBPATH: &'static str = "chain"; diff --git a/store/src/types.rs b/store/src/types.rs index 2c0f2f2a7..d059d9dde 100644 --- a/store/src/types.rs +++ b/store/src/types.rs @@ -328,24 +328,6 @@ impl RemoveLog { include_tuple(&self.removed, elmt) || include_tuple(&self.removed_tmp, elmt) } - /// How many removed positions exist before this particular position - pub fn get_shift(&self, elmt: u64) -> usize { - let mut complete_list = self.removed.clone(); - for e in &self.removed_tmp { - match self.removed.binary_search(&e) { - Ok(_) => continue, - Err(idx) => { - complete_list.insert(idx, *e); - } - } - } - let pos = match complete_list.binary_search(&(elmt, 0)) { - Ok(idx) => idx + 1, - Err(idx) => idx, - }; - complete_list.split_at(pos).0.len() - } - /// Number of positions stored in the remove log. pub fn len(&self) -> usize { self.removed.len()