From 48f9ec61f423d65fe8d574ec85195e42367158ae Mon Sep 17 00:00:00 2001 From: Antioch Peverell Date: Fri, 5 Oct 2018 09:17:57 +0100 Subject: [PATCH] cleanup some build warnings (#1661) --- core/src/pow/cuckatoo.rs | 5 ++--- core/src/pow/cuckoo.rs | 3 +-- core/src/pow/lean.rs | 7 ++----- core/src/pow/mod.rs | 1 - 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/core/src/pow/cuckatoo.rs b/core/src/pow/cuckatoo.rs index 70681df4..3a9eb71a 100644 --- a/core/src/pow/cuckatoo.rs +++ b/core/src/pow/cuckatoo.rs @@ -12,13 +12,12 @@ // limitations under the License. //! Implementation of Cuckatoo Cycle designed by John Tromp. -use pow::num::ToPrimitive; use std::mem; -use byteorder::{BigEndian, LittleEndian, WriteBytesExt}; +use byteorder::{BigEndian, WriteBytesExt}; use croaring::Bitmap; -use pow::common::{self, CuckooParams, EdgeType, Link}; +use pow::common::{CuckooParams, EdgeType, Link}; use pow::error::{Error, ErrorKind}; use pow::{PoWContext, Proof}; use util; diff --git a/core/src/pow/cuckoo.rs b/core/src/pow/cuckoo.rs index df636d3d..71a1acb0 100644 --- a/core/src/pow/cuckoo.rs +++ b/core/src/pow/cuckoo.rs @@ -17,9 +17,8 @@ //! simple miner is included, mostly for testing purposes. John Tromp's Tomato //! miner will be much faster in almost every environment. -use pow::common::{self, CuckooParams, Edge, EdgeType}; +use pow::common::{CuckooParams, Edge, EdgeType}; use pow::error::{Error, ErrorKind}; -use pow::num::ToPrimitive; use pow::{PoWContext, Proof}; use std::cmp; diff --git a/core/src/pow/lean.rs b/core/src/pow/lean.rs index aa10973d..5a001522 100644 --- a/core/src/pow/lean.rs +++ b/core/src/pow/lean.rs @@ -13,15 +13,12 @@ //! Lean miner for Cuckatoo Cycle -use std::time::{Duration, Instant}; - use croaring::Bitmap; use pow::common::CuckooParams; use pow::cuckatoo::CuckatooContext; -use pow::error::{Error, ErrorKind}; -use pow::siphash::siphash24; -use pow::{PoWContext, Proof}; +use pow::error::Error; +use pow::Proof; /// Lean miner implementation aiming to be as short and simple as possible. /// As a consequence, it's a little less than 10 times slower than John diff --git a/core/src/pow/mod.rs b/core/src/pow/mod.rs index 2e927475..f9f7b000 100644 --- a/core/src/pow/mod.rs +++ b/core/src/pow/mod.rs @@ -47,7 +47,6 @@ mod siphash; mod types; use chrono::prelude::{DateTime, NaiveDateTime, Utc}; -use consensus; use core::{Block, BlockHeader}; use genesis; use global;