stop copying Blooms (#3379)

* stop copying Blooms

* fixup

* clippy
This commit is contained in:
Rob Walker
2019-03-20 11:06:39 -07:00
committed by GitHub
parent 13c9d3d4e1
commit df9fd2bc0b
4 changed files with 115 additions and 43 deletions

View File

@ -130,14 +130,13 @@ pub fn process_blocktree(
warn!("entry0 not present");
return Err(BlocktreeProcessorError::LedgerVerificationFailed);
}
let entry0 = &entries[0];
let entry0 = entries.remove(0);
if !(entry0.is_tick() && entry0.verify(&last_entry_hash)) {
warn!("Ledger proof of history failed at entry0");
return Err(BlocktreeProcessorError::LedgerVerificationFailed);
}
last_entry_hash = entry0.hash;
entry_height += 1;
entries = entries.drain(1..).collect();
}
if !entries.is_empty() {