Satisfy Clippy, remove non-tree-states code

This commit is contained in:
Michael Sproul
2022-03-28 11:42:55 +11:00
parent 705cba6443
commit c5212d0f98
45 changed files with 129 additions and 1153 deletions

View File

@@ -217,15 +217,11 @@ where
pre_block_hook(&mut self.state, block)?;
}
let verify_block_root = self.verify_block_root.unwrap_or_else(|| {
// If no explicit policy is set, verify only the first 1 or 2 block roots if using
// accurate state roots. Inaccurate state roots require block root verification to
// be off.
if i <= 1 {
VerifyBlockRoot::True
} else {
VerifyBlockRoot::False
}
// If no explicit policy is set, verify only the first 1 or 2 block roots.
let verify_block_root = self.verify_block_root.unwrap_or(if i <= 1 {
VerifyBlockRoot::True
} else {
VerifyBlockRoot::False
});
let mut ctxt = ConsensusContext::new(block.slot());
per_block_processing(