This commit is contained in:
Eitan Seri-Levi
2026-05-07 16:43:32 +03:00

View File

@@ -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 });
}
} }
} }