forgor something

This commit is contained in:
Daniel Knopik
2022-09-17 21:38:57 +02:00
parent eab1fce0e5
commit 750c594f5f
5 changed files with 81 additions and 7 deletions

View File

@@ -376,7 +376,7 @@ pub struct BeaconChain<T: BeaconChainTypes> {
/// continue they can request that everything shuts down.
pub shutdown_sender: Sender<ShutdownReason>,
pub block_waiting_for_sidecar: Mutex<Option<GossipVerifiedBlock<T>>>,
pub sidecar_waiting_for_block: Mutex<Option<SignedBlobsSidecar<T::EthSpec>>>,
pub sidecar_waiting_for_block: Mutex<Option<Arc<SignedBlobsSidecar<T::EthSpec>>>>,
/// Logging to CLI, etc.
pub(crate) log: Logger,
/// Arbitrary bytes included in the blocks.
@@ -2431,7 +2431,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
pub async fn process_block<B: IntoExecutionPendingBlock<T>>(
self: &Arc<Self>,
unverified_block: B,
sidecar: Option<SignedBlobsSidecar<T::EthSpec>>,
sidecar: Option<Arc<SignedBlobsSidecar<T::EthSpec>>>,
count_unrealized: CountUnrealized,
) -> Result<Hash256, BlockError<T::EthSpec>> {
// Start the Prometheus timer.
@@ -2506,7 +2506,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
async fn import_execution_pending_block(
self: Arc<Self>,
execution_pending_block: ExecutionPendingBlock<T>,
sidecar: Option<SignedBlobsSidecar<T::EthSpec>>,
sidecar: Option<Arc<SignedBlobsSidecar<T::EthSpec>>>,
count_unrealized: CountUnrealized,
) -> Result<Hash256, BlockError<T::EthSpec>> {
let ExecutionPendingBlock {
@@ -2585,7 +2585,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
fn import_block(
&self,
signed_block: Arc<SignedBeaconBlock<T::EthSpec>>,
sidecar: Option<SignedBlobsSidecar<T::EthSpec>>,
sidecar: Option<Arc<SignedBlobsSidecar<T::EthSpec>>>,
block_root: Hash256,
mut state: BeaconState<T::EthSpec>,
confirmed_state_roots: Vec<Hash256>,

View File

@@ -16,7 +16,7 @@ pub const DEFAULT_SNAPSHOT_CACHE_SIZE: usize = 4;
const MINIMUM_BLOCK_DELAY_FOR_CLONE: Duration = Duration::from_secs(6);
/// This snapshot is to be used for verifying a child of `self.beacon_block`.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct PreProcessingSnapshot<T: EthSpec> {
/// This state is equivalent to the `self.beacon_block.state_root()` state that has been
/// advanced forward one slot using `per_slot_processing`. This state is "primed and ready" for