From f5f4736e7c44aa661601119a6481002f389fa5e9 Mon Sep 17 00:00:00 2001 From: debris Date: Wed, 31 Aug 2016 17:36:49 +0200 Subject: [PATCH] simplified iterator --- ethcore/src/blockchain/blockchain.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethcore/src/blockchain/blockchain.rs b/ethcore/src/blockchain/blockchain.rs index 1ca441e69..943dc04c5 100644 --- a/ethcore/src/blockchain/blockchain.rs +++ b/ethcore/src/blockchain/blockchain.rs @@ -975,8 +975,8 @@ impl BlockChain { }, BlockLocation::BranchBecomingCanonChain(ref data) => { let addresses = data.enacted.iter() - .map(|hash| (hash, self.block_body(hash).unwrap())) - .flat_map(|(hash, bytes)| { + .flat_map(|hash| { + let bytes = self.block_body(hash).expect("Enacted block must be in database."); let hashes = BodyView::new(&bytes).transaction_hashes(); hashes.into_iter() .enumerate()