mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 03:08:28 +00:00
Complete gloas child logic
This commit is contained in:
@@ -3394,6 +3394,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
{
|
||||
return Err(BlockError::ParentUnknown {
|
||||
parent_root: blob.block_parent_root(),
|
||||
parent_block_hash: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -3520,7 +3521,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.fork_choice_read_lock()
|
||||
.contains_block(&parent_root)
|
||||
{
|
||||
return Err(BlockError::ParentUnknown { parent_root });
|
||||
return Err(BlockError::ParentUnknown {
|
||||
parent_root,
|
||||
parent_block_hash: None,
|
||||
});
|
||||
}
|
||||
|
||||
self.emit_sse_data_column_sidecar_events(
|
||||
|
||||
@@ -95,6 +95,7 @@ use store::{Error as DBError, KeyValueStore};
|
||||
use strum::{AsRefStr, IntoStaticStr};
|
||||
use task_executor::JoinHandle;
|
||||
use tracing::{Instrument, Span, debug, debug_span, error, info_span, instrument};
|
||||
use types::ExecutionBlockHash;
|
||||
use types::{
|
||||
BeaconBlockRef, BeaconState, BeaconStateError, BlobsList, ChainSpec, DataColumnSidecarList,
|
||||
Epoch, EthSpec, FullPayload, Hash256, InconsistentFork, KzgProofs, RelativeEpoch,
|
||||
@@ -122,7 +123,10 @@ pub enum BlockError {
|
||||
///
|
||||
/// It's unclear if this block is valid, but it cannot be processed without already knowing
|
||||
/// its parent.
|
||||
ParentUnknown { parent_root: Hash256 },
|
||||
ParentUnknown {
|
||||
parent_root: Hash256,
|
||||
parent_block_hash: Option<ExecutionBlockHash>,
|
||||
},
|
||||
/// The block slot is greater than the present slot.
|
||||
///
|
||||
/// ## Peer scoring
|
||||
@@ -1389,6 +1393,7 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
|
||||
ParentImportStatus::UnknownBlock | ParentImportStatus::UnknownPayload => {
|
||||
return Err(BlockError::ParentUnknown {
|
||||
parent_root: block.parent_root(),
|
||||
parent_block_hash: block.as_block().payload_bid_parent_block_hash().ok(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1764,6 +1769,7 @@ pub fn check_block_is_finalized_checkpoint_or_descendant<
|
||||
} else {
|
||||
Err(BlockError::ParentUnknown {
|
||||
parent_root: block.parent_root(),
|
||||
parent_block_hash: block.as_block().payload_bid_parent_block_hash().ok(),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1858,6 +1864,7 @@ fn verify_parent_block_and_envelope_are_known<T: BeaconChainTypes>(
|
||||
ParentImportStatus::UnknownBlock | ParentImportStatus::UnknownPayload => {
|
||||
Err(BlockError::ParentUnknown {
|
||||
parent_root: block.parent_root(),
|
||||
parent_block_hash: block.payload_bid_parent_block_hash().ok(),
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1890,6 +1897,7 @@ fn load_parent<T: BeaconChainTypes, B: AsBlock<T::EthSpec>>(
|
||||
{
|
||||
return Err(BlockError::ParentUnknown {
|
||||
parent_root: block.parent_root(),
|
||||
parent_block_hash: block.as_block().payload_bid_parent_block_hash().ok(),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user