Skip to content

Commit

Permalink
Fix mistake in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Aug 15, 2020
1 parent f93a681 commit 2ab752b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,20 +673,18 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
}

while state.slot < block.message.slot {
let state_root = state_root_from_prev_block(i, &state);
let state_root = match block_replay {
BlockReplay::Accurate => state_root_from_prev_block(i, &state),
BlockReplay::InconsistentStateRoots => Some(Hash256::zero()),
};
per_slot_processing(&mut state, state_root, &self.spec)
.map_err(HotColdDBError::BlockReplaySlotError)?;
}

let state_root = match block_replay {
BlockReplay::Accurate => None,
BlockReplay::InconsistentStateRoots => Some(Hash256::zero()),
};

per_block_processing(
&mut state,
&block,
state_root,
None,
BlockSignatureStrategy::NoVerification,
&self.spec,
)
Expand Down

0 comments on commit 2ab752b

Please sign in to comment.