Several changes

* Fix state cache pruning of finalized state from block map
* Update to latest `milhouse`
* Check beacon state diffs in EF tests
This commit is contained in:
Michael Sproul
2022-03-01 15:49:40 +11:00
parent 143cf59504
commit 98629ce741
17 changed files with 115 additions and 50 deletions

View File

@@ -95,8 +95,7 @@ impl<E: EthSpec> StateCache<E> {
finalized_state.state_root == state_root
})
{
// FIXME(sproul): this should technically be true
return Ok(false);
return Ok(true);
}
if self.states.peek(&state_root).is_some() {
return Ok(true);
@@ -167,7 +166,7 @@ impl BlockMap {
self.blocks.retain(|_, slot_map| {
slot_map.slots.retain(|slot, state_root| {
let keep = *slot > finalized_slot;
let keep = *slot >= finalized_slot;
if !keep {
pruned_states.insert(*state_root);
}