Merge remote-tracking branch 'origin/unstable' into tree-states

This commit is contained in:
Michael Sproul
2023-07-19 11:23:52 +10:00
98 changed files with 3117 additions and 2189 deletions

View File

@@ -67,6 +67,7 @@ pub enum Error {
InvalidValidatorPubkeyBytes(bls::Error),
ValidatorPubkeyCacheUninitialized,
InvalidKey,
InvalidBytes,
UnableToDowngrade,
Hdiff(hdiff::Error),
InconsistentFork(InconsistentFork),

View File

@@ -109,7 +109,7 @@ impl<'a, E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> Iterator
.next()?
.and_then(|(slot_bytes, root_bytes)| {
if slot_bytes.len() != 8 || root_bytes.len() != 32 {
panic!("FIXME(sproul): put an error here")
Err(Error::InvalidBytes)
} else {
let slot = Slot::new(u64::from_be_bytes(slot_bytes.try_into().unwrap()));
let root = Hash256::from_slice(&root_bytes);