mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::chunked_vector::{
|
||||
load_variable_list_from_db, load_vector_from_db, BlockRootsChunked, HistoricalRoots,
|
||||
HistoricalSummaries, RandaoMixes, StateRootsChunked,
|
||||
BlockRootsChunked, HistoricalRoots, HistoricalSummaries, RandaoMixes, StateRootsChunked,
|
||||
load_variable_list_from_db, load_vector_from_db,
|
||||
};
|
||||
use crate::{DBColumn, Error, KeyValueStore, KeyValueStoreOp};
|
||||
use ssz::{Decode, DecodeError, Encode};
|
||||
@@ -232,13 +232,12 @@ impl<E: EthSpec> PartialBeaconState<E> {
|
||||
spec: &ChainSpec,
|
||||
) -> Result<(), Error> {
|
||||
let slot = self.slot();
|
||||
if let Ok(historical_summaries) = self.historical_summaries_mut() {
|
||||
if historical_summaries.is_none() {
|
||||
*historical_summaries =
|
||||
Some(load_variable_list_from_db::<HistoricalSummaries, E, _>(
|
||||
store, slot, spec,
|
||||
)?);
|
||||
}
|
||||
if let Ok(historical_summaries) = self.historical_summaries_mut()
|
||||
&& historical_summaries.is_none()
|
||||
{
|
||||
*historical_summaries = Some(load_variable_list_from_db::<HistoricalSummaries, E, _>(
|
||||
store, slot, spec,
|
||||
)?);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user