mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Use E for EthSpec trait, instead of B
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user