Use E for EthSpec trait, instead of B

This commit is contained in:
Paul Hauner
2019-05-13 14:44:43 +10:00
parent afa8fff31a
commit fcabef91da
20 changed files with 110 additions and 110 deletions

View File

@@ -19,14 +19,14 @@ impl<T: ClientDB> BeaconStateStore<T> {
Self { db }
}
pub fn get_deserialized<B: EthSpec>(
pub fn get_deserialized<E: EthSpec>(
&self,
hash: &Hash256,
) -> Result<Option<BeaconState<B>>, DBError> {
) -> Result<Option<BeaconState<E>>, DBError> {
match self.get(&hash)? {
None => Ok(None),
Some(ssz) => {
let state = decode::<BeaconState<B>>(&ssz).map_err(|_| DBError {
let state = decode::<BeaconState<E>>(&ssz).map_err(|_| DBError {
message: "Bad State SSZ.".to_string(),
})?;
Ok(Some(state))