From dd90aaedbc564e5bc5cf9f325a5a9140870a540f Mon Sep 17 00:00:00 2001 From: Quentin Le Sceller Date: Fri, 6 Jul 2018 13:40:43 -0400 Subject: [PATCH] Remove unused import and code (#1224) * Remove unused import and code --- core/src/global.rs | 4 ++-- store/src/pmmr.rs | 14 ++------------ wallet/src/libwallet/internal/restore.rs | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/core/src/global.rs b/core/src/global.rs index f8900f9bf..e40f3e516 100644 --- a/core/src/global.rs +++ b/core/src/global.rs @@ -59,7 +59,7 @@ pub const TESTING_INITIAL_DIFFICULTY: u64 = 1; /// Testnet 2 initial block difficulty, high to see how it goes pub const TESTNET2_INITIAL_DIFFICULTY: u64 = 1000; -/// Testnet 2 initial block difficulty, moderatly hight, taking into account +/// Testnet 2 initial block difficulty, moderately hight, taking into account /// a 30x Cuckoo adjustment factor pub const TESTNET3_INITIAL_DIFFICULTY: u64 = 15000; @@ -75,7 +75,7 @@ pub enum ChainTypes { Testnet1, /// Second test network Testnet2, - /// Thirs test network + /// Third test network Testnet3, /// Main production network Mainnet, diff --git a/store/src/pmmr.rs b/store/src/pmmr.rs index a0b210faa..fdc65baf5 100644 --- a/store/src/pmmr.rs +++ b/store/src/pmmr.rs @@ -13,10 +13,7 @@ //! Implementation of the persistent Backend for the prunable MMR tree. -use std::fs; -use std::io; -use std::marker; -use std::path::Path; +use std::{fs, io, marker}; use croaring::Bitmap; @@ -26,8 +23,7 @@ use core::core::BlockHeader; use core::ser::{self, PMMRable}; use leaf_set::LeafSet; use prune_list::PruneList; -use rm_log::RemoveLog; -use types::{prune_noop, read_ordered_vec, AppendOnlyFile}; +use types::{prune_noop, AppendOnlyFile}; use util::LOGGER; const PMMR_HASH_FILE: &'static str = "pmmr_hash.bin"; @@ -35,12 +31,6 @@ const PMMR_DATA_FILE: &'static str = "pmmr_data.bin"; const PMMR_LEAF_FILE: &'static str = "pmmr_leaf.bin"; const PMMR_PRUN_FILE: &'static str = "pmmr_prun.bin"; -// TODO - we can get rid of these for testnet3 (only used for migration during -// testnet2). "Legacy" rm_log.bin and pruned.bin files (used when migrating -// existing node). -const LEGACY_RM_LOG_FILE: &'static str = "pmmr_rm_log.bin"; -const LEGACY_PRUNED_FILE: &'static str = "pmmr_pruned.bin"; - /// PMMR persistent backend implementation. Relies on multiple facilities to /// handle writing, reading and pruning. /// diff --git a/wallet/src/libwallet/internal/restore.rs b/wallet/src/libwallet/internal/restore.rs index 57fd58481..ec4ff75a8 100644 --- a/wallet/src/libwallet/internal/restore.rs +++ b/wallet/src/libwallet/internal/restore.rs @@ -19,7 +19,7 @@ use libtx::proof; use libwallet::Error; use libwallet::types::*; use util::secp::{pedersen, key::SecretKey}; -use util::{self, LOGGER}; +use util::LOGGER; /// Utility struct for return values from below struct OutputResult {