simplified iterator
This commit is contained in:
parent
996b4b9dc0
commit
f5f4736e7c
@ -975,8 +975,8 @@ impl BlockChain {
|
|||||||
},
|
},
|
||||||
BlockLocation::BranchBecomingCanonChain(ref data) => {
|
BlockLocation::BranchBecomingCanonChain(ref data) => {
|
||||||
let addresses = data.enacted.iter()
|
let addresses = data.enacted.iter()
|
||||||
.map(|hash| (hash, self.block_body(hash).unwrap()))
|
.flat_map(|hash| {
|
||||||
.flat_map(|(hash, bytes)| {
|
let bytes = self.block_body(hash).expect("Enacted block must be in database.");
|
||||||
let hashes = BodyView::new(&bytes).transaction_hashes();
|
let hashes = BodyView::new(&bytes).transaction_hashes();
|
||||||
hashes.into_iter()
|
hashes.into_iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
|
Loading…
Reference in New Issue
Block a user