Tweak signature verifier handling of proposer

This commit is contained in:
Michael Sproul
2022-09-14 17:28:49 +10:00
parent a2228d8599
commit b284f81a7d
10 changed files with 42 additions and 23 deletions

View File

@@ -892,11 +892,11 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
// Backtrack until we reach a state that is in the cache, or in the worst case
// the finalized state (this should only be reachable on first start-up).
let mut state_root_iter = HotStateRootIter::new(self, slot, *state_root);
let state_root_iter = HotStateRootIter::new(self, slot, *state_root);
let mut state_roots = Vec::with_capacity(32);
let mut state = None;
while let Some(res) = state_root_iter.next() {
for res in state_root_iter {
let (prior_state_root, prior_slot) = res?;
state_roots.push(Ok((prior_state_root, prior_slot)));

View File

@@ -28,7 +28,7 @@ impl<'a, E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotStateRootIter<'a,
let summary = self
.store
.load_hot_state_summary(&self.next_state_root)?
.ok_or_else(|| HotColdDBError::MissingHotStateSummary(self.next_state_root))?;
.ok_or(HotColdDBError::MissingHotStateSummary(self.next_state_root))?;
let slot = self.next_slot;
let state_root = self.next_state_root;