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()
|
.gloas_enabled()
|
||||||
&& parent_block.slot() > finalized_slot
|
&& parent_block.slot() > finalized_slot
|
||||||
{
|
{
|
||||||
if chain.store.get_payload_envelope(&root)?.is_none() {
|
let in_store = chain.store.get_payload_envelope(&root)?.is_some();
|
||||||
debug!(
|
if !in_store {
|
||||||
parent_root = %root,
|
// If the parent is already in fork choice it was previously imported.
|
||||||
parent_slot = %parent_block.slot(),
|
// Its envelope may not be in the store if PayloadEnvelopesByRange
|
||||||
%finalized_slot,
|
// didn't return it, but the block itself is valid and trusted.
|
||||||
"load_parent: parent envelope not in store",
|
let in_fork_choice = chain
|
||||||
);
|
.canonical_head
|
||||||
return Err(BlockError::ParentEnvelopeUnknown { parent_root: root });
|
.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