Add unexpected error variant

This commit is contained in:
Eitan Seri- Levi
2026-02-09 20:46:24 -08:00
parent 47500e2c1f
commit 8a53da9906
2 changed files with 2 additions and 4 deletions

View File

@@ -692,11 +692,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
));
}
}
// TODO(gloas) we should never receive a blinded response.
// Should return some type of `Unexpected` error variant as this should never happen
// in the V4 block production flow
BlockProposalContentsType::Blinded(_) => {
return Err(BlockProductionError::GloasNotImplemented);
return Err(BlockProductionError::Unexpected("Should never produce a blinded block post-Gloas".to_owned()));
}
};

View File

@@ -321,6 +321,7 @@ pub enum BlockProductionError {
SszTypesError(ssz_types::Error),
// TODO(gloas): Remove this once Gloas is implemented
GloasNotImplemented,
Unexpected(String),
}
easy_from_to!(BlockProcessingError, BlockProductionError);