mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 08:52:54 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use crate::data_availability_checker::{AvailableBlock, AvailableBlockData};
|
||||
use crate::{metrics, BeaconChain, BeaconChainTypes};
|
||||
use crate::{BeaconChain, BeaconChainTypes, metrics};
|
||||
use itertools::Itertools;
|
||||
use state_processing::{
|
||||
per_block_processing::ParallelSignatureSets,
|
||||
signature_sets::{block_proposal_signature_set_from_parts, Error as SignatureSetError},
|
||||
signature_sets::{Error as SignatureSetError, block_proposal_signature_set_from_parts},
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
use std::iter;
|
||||
@@ -237,30 +237,30 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
let mut anchor_and_blob_batch = Vec::with_capacity(3);
|
||||
|
||||
// Update the blob info.
|
||||
if new_oldest_blob_slot != blob_info.oldest_blob_slot {
|
||||
if let Some(oldest_blob_slot) = new_oldest_blob_slot {
|
||||
let new_blob_info = BlobInfo {
|
||||
oldest_blob_slot: Some(oldest_blob_slot),
|
||||
..blob_info.clone()
|
||||
};
|
||||
anchor_and_blob_batch.push(
|
||||
self.store
|
||||
.compare_and_set_blob_info(blob_info, new_blob_info)?,
|
||||
);
|
||||
}
|
||||
if new_oldest_blob_slot != blob_info.oldest_blob_slot
|
||||
&& let Some(oldest_blob_slot) = new_oldest_blob_slot
|
||||
{
|
||||
let new_blob_info = BlobInfo {
|
||||
oldest_blob_slot: Some(oldest_blob_slot),
|
||||
..blob_info.clone()
|
||||
};
|
||||
anchor_and_blob_batch.push(
|
||||
self.store
|
||||
.compare_and_set_blob_info(blob_info, new_blob_info)?,
|
||||
);
|
||||
}
|
||||
|
||||
// Update the data column info.
|
||||
if new_oldest_data_column_slot != data_column_info.oldest_data_column_slot {
|
||||
if let Some(oldest_data_column_slot) = new_oldest_data_column_slot {
|
||||
let new_data_column_info = DataColumnInfo {
|
||||
oldest_data_column_slot: Some(oldest_data_column_slot),
|
||||
};
|
||||
anchor_and_blob_batch.push(
|
||||
self.store
|
||||
.compare_and_set_data_column_info(data_column_info, new_data_column_info)?,
|
||||
);
|
||||
}
|
||||
if new_oldest_data_column_slot != data_column_info.oldest_data_column_slot
|
||||
&& let Some(oldest_data_column_slot) = new_oldest_data_column_slot
|
||||
{
|
||||
let new_data_column_info = DataColumnInfo {
|
||||
oldest_data_column_slot: Some(oldest_data_column_slot),
|
||||
};
|
||||
anchor_and_blob_batch.push(
|
||||
self.store
|
||||
.compare_and_set_data_column_info(data_column_info, new_data_column_info)?,
|
||||
);
|
||||
}
|
||||
|
||||
// Update the anchor.
|
||||
|
||||
Reference in New Issue
Block a user