mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
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:
@@ -73,7 +73,7 @@ impl<E: EthSpec> Case for SanityBlocks<E> {
|
||||
.iter()
|
||||
.try_for_each(|block| {
|
||||
while state.slot < block.slot {
|
||||
per_slot_processing(&mut state, spec).unwrap();
|
||||
per_slot_processing(&mut state, None, spec).unwrap();
|
||||
}
|
||||
|
||||
state
|
||||
|
||||
@@ -66,7 +66,7 @@ impl<E: EthSpec> Case for SanitySlots<E> {
|
||||
state.build_all_caches(spec).unwrap();
|
||||
|
||||
let mut result = (0..self.slots)
|
||||
.try_for_each(|_| per_slot_processing(&mut state, spec))
|
||||
.try_for_each(|_| per_slot_processing(&mut state, None, spec))
|
||||
.map(|_| state);
|
||||
|
||||
compare_beacon_state_results_without_caches(&mut result, &mut expected)
|
||||
|
||||
Reference in New Issue
Block a user