From 76696e3b49a2a8e84caa11a1d27c2f9ad5e78cb8 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 13 Mar 2016 15:36:03 +0100 Subject: [PATCH] Minor build fixes. --- ethcore/src/client/client.rs | 2 +- ethcore/src/client/test_client.rs | 2 ++ miner/src/miner.rs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index 8c3d73ebb..d748cc4ee 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -315,7 +315,7 @@ impl Client where V: Verifier { if !imported_blocks.is_empty() && self.block_queue.queue_info().is_empty() { let (enacted, retracted) = self.calculate_enacted_retracted(import_results); io.send(NetworkIoMessage::User(SyncMessage::NewChainBlocks { - good: imported_blocks, + imported: imported_blocks, invalid: invalid_blocks, enacted: enacted, retracted: retracted, diff --git a/ethcore/src/client/test_client.rs b/ethcore/src/client/test_client.rs index d801c08e0..a97228b09 100644 --- a/ethcore/src/client/test_client.rs +++ b/ethcore/src/client/test_client.rs @@ -83,10 +83,12 @@ impl TestBlockChainClient { client } + /// Set the balance of account `address` to `balance`. pub fn set_balance(&mut self, address: Address, balance: U256) { self.balances.write().unwrap().insert(address, balance); } + /// Set storage `position` to `value` for account `address`. pub fn set_storage(&mut self, address: Address, position: H256, value: H256) { self.storage.write().unwrap().insert((address, position), value); } diff --git a/miner/src/miner.rs b/miner/src/miner.rs index a07da7569..ad403150d 100644 --- a/miner/src/miner.rs +++ b/miner/src/miner.rs @@ -150,7 +150,7 @@ impl MinerService for Miner { } } - fn chain_new_blocks(&self, chain: &BlockChainClient, imported: &[H256], invalid: &[H256], enacted: &[H256], _retracted: &[H256]) { + fn chain_new_blocks(&self, chain: &BlockChainClient, imported: &[H256], invalid: &[H256], enacted: &[H256], retracted: &[H256]) { fn fetch_transactions(chain: &BlockChainClient, hash: &H256) -> Vec { let block = chain .block(BlockId::Hash(*hash)) @@ -165,9 +165,9 @@ impl MinerService for Miner { let in_chain = in_chain .par_iter() .flat_map(|h| h.par_iter().map(|h| fetch_transactions(chain, h))); - .map(|h| fetch_transactions(chain, h)); let out_of_chain = retracted .par_iter() + .map(|h| fetch_transactions(chain, h)); in_chain.for_each(|txs| { let mut transaction_queue = self.transaction_queue.lock().unwrap();