mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Update
This commit is contained in:
@@ -2054,14 +2054,24 @@ fn load_parent<T: BeaconChainTypes, B: AsBlock<T::EthSpec>>(
|
||||
.gloas_enabled()
|
||||
&& parent_block.slot() > finalized_slot
|
||||
{
|
||||
if chain.store.get_payload_envelope(&root)?.is_none() {
|
||||
debug!(
|
||||
parent_root = %root,
|
||||
parent_slot = %parent_block.slot(),
|
||||
%finalized_slot,
|
||||
"load_parent: parent envelope not in store",
|
||||
);
|
||||
return Err(BlockError::ParentEnvelopeUnknown { parent_root: root });
|
||||
let in_store = chain.store.get_payload_envelope(&root)?.is_some();
|
||||
if !in_store {
|
||||
// If the parent is already in fork choice it was previously imported.
|
||||
// Its envelope may not be in the store if PayloadEnvelopesByRange
|
||||
// didn't return it, but the block itself is valid and trusted.
|
||||
let in_fork_choice = chain
|
||||
.canonical_head
|
||||
.fork_choice_read_lock()
|
||||
.contains_block(&root);
|
||||
if !in_fork_choice {
|
||||
debug!(
|
||||
parent_root = %root,
|
||||
parent_slot = %parent_block.slot(),
|
||||
%finalized_slot,
|
||||
"load_parent: parent envelope not in store and not in fork choice",
|
||||
);
|
||||
return Err(BlockError::ParentEnvelopeUnknown { parent_root: root });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user