Load all states relative to finalized state

This commit is contained in:
Michael Sproul
2022-02-15 15:37:24 +11:00
parent b8709fdcab
commit e86cff2f8b
7 changed files with 58 additions and 119 deletions

View File

@@ -49,8 +49,8 @@ enum Error {
block_root: Hash256,
},
BadStateSlot {
_state_slot: Slot,
_block_slot: Slot,
state_slot: Slot,
current_slot: Slot,
},
}
@@ -225,9 +225,8 @@ fn advance_head<T: BeaconChainTypes>(
// Advancing more than one slot without storing the intermediate state would corrupt the
// database. Future works might store temporary, intermediate states inside this function.
return Err(Error::BadStateSlot {
// FIXME(sproul): wrong
_block_slot: state.slot(),
_state_slot: state.slot(),
state_slot: state.slot(),
current_slot: current_slot,
});
}