From 3253d2a17b5f6e4fda28a043f74cb1d40c1adbd8 Mon Sep 17 00:00:00 2001 From: debris Date: Fri, 19 Feb 2016 15:34:12 +0100 Subject: [PATCH] fixed ethsync tests compile errors and warnings --- sync/src/range_collection.rs | 2 +- sync/src/tests/helpers.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sync/src/range_collection.rs b/sync/src/range_collection.rs index c3333ab63..dc2f4e446 100644 --- a/sync/src/range_collection.rs +++ b/sync/src/range_collection.rs @@ -207,7 +207,7 @@ impl RangeCollection for Vec<(K, Vec)> where K: Ord + PartialEq + } #[test] -#[allow(cyclomatic_complexity)] +#[cfg_attr(feature="dev", allow(cyclomatic_complexity))] fn test_range() { use std::cmp::{Ordering}; diff --git a/sync/src/tests/helpers.rs b/sync/src/tests/helpers.rs index ca6d79814..7f2928ccd 100644 --- a/sync/src/tests/helpers.rs +++ b/sync/src/tests/helpers.rs @@ -23,6 +23,8 @@ use io::SyncIo; use chain::{ChainSync}; use ethcore::receipt::Receipt; use ethcore::transaction::LocalizedTransaction; +use ethcore::filter::Filter; +use ethcore::log_entry::LocalizedLogEntry; pub struct TestBlockChainClient { pub blocks: RwLock>, @@ -115,6 +117,10 @@ impl BlockChainClient for TestBlockChainClient { unimplemented!(); } + fn logs(&self, filter: Filter) -> Vec { + unimplemented!(); + } + fn block_header(&self, id: BlockId) -> Option { self.block_hash(id).and_then(|hash| self.blocks.read().unwrap().get(&hash).map(|r| Rlp::new(r).at(0).as_raw().to_vec())) }