Optimization: avoid recomputing known state roots (#762)

* Start adding optimization

* Add temp fix for protobuf issue

* Fix compile errors

* Fix protobuf import
This commit is contained in:
Paul Hauner
2020-01-03 15:09:00 +11:00
committed by GitHub
parent 39df89521f
commit 647034b637
11 changed files with 42 additions and 16 deletions

View File

@@ -424,7 +424,7 @@ impl<E: EthSpec> HotColdDB<E> {
for block in blocks {
while state.slot < block.slot {
per_slot_processing(&mut state, &self.spec)
per_slot_processing(&mut state, None, &self.spec)
.map_err(HotColdDbError::BlockReplaySlotError)?;
}
per_block_processing(
@@ -438,7 +438,7 @@ impl<E: EthSpec> HotColdDB<E> {
}
while state.slot < target_slot {
per_slot_processing(&mut state, &self.spec)
per_slot_processing(&mut state, None, &self.spec)
.map_err(HotColdDbError::BlockReplaySlotError)?;
}