simplified iterator
This commit is contained in:
parent
996b4b9dc0
commit
f5f4736e7c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user