mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-15 09:48:20 +00:00
Encapsulate the "is this block's parent in a state where we can process the child?" check as `AwaitingParent::is_parent_imported(cx)`. The block Downloaded arm in continue_requests now calls this single method instead of inlining a fork-choice lookup. For Gloas this adds a real new gate: if the child's bid identifies the parent as full (bid.parent_block_hash == parent.execution_status block hash), we additionally require the parent's envelope to be imported via ForkChoice::is_payload_received. A full Gloas parent without its envelope hasn't realised its post-state yet, so the child can't be processed against it. The previous block-only check let the child proceed too early. Rename `AwaitingParent::parent_hash` → `gloas_bid_parent_hash` to make the intent explicit (it's bid metadata, only Some post-Gloas) and add a matching getter. Drop `SignedBeaconBlock::execution_hash` (no remaining callers; `get_data_peers` now extracts the bid inline). Also simplifies `get_data_peers` to take `&SignedBeaconBlock` directly and gate on `signed_execution_payload_bid().is_ok()` rather than threading slot/spec for a fork-name check.