mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 03:08:28 +00:00
fix
This commit is contained in:
@@ -801,7 +801,11 @@ where
|
||||
.get_payload_envelope(&head_block_root)
|
||||
.map_err(|e| format!("Error loading head execution envelope: {:?}", e))?
|
||||
.map(Arc::new)
|
||||
} else {
|
||||
} else if self
|
||||
.spec
|
||||
.fork_name_at_slot::<E>(head_block.slot())
|
||||
.gloas_enabled()
|
||||
{
|
||||
let latest_full_block_root_opt = fork_choice
|
||||
.latest_parent_full_block(head_block_root, &self.spec)
|
||||
.map_err(|e| {
|
||||
@@ -820,6 +824,8 @@ where
|
||||
// TODO(gloas) handle the case where the non-finalized portion of the chain has no canonical payload envelopes.
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let mut head_snapshot = BeaconSnapshot {
|
||||
|
||||
@@ -344,7 +344,10 @@ impl<T: BeaconChainTypes> CanonicalHead<T> {
|
||||
store
|
||||
.get_payload_envelope(&beacon_block_root)?
|
||||
.map(Arc::new)
|
||||
} else {
|
||||
} else if spec
|
||||
.fork_name_at_slot::<T::EthSpec>(beacon_block.slot())
|
||||
.gloas_enabled()
|
||||
{
|
||||
let latest_full_block_root_opt =
|
||||
fork_choice.latest_parent_full_block(beacon_block_root, spec)?;
|
||||
|
||||
@@ -356,6 +359,8 @@ impl<T: BeaconChainTypes> CanonicalHead<T> {
|
||||
// TODO(gloas) handle the case where the non-finalized portion of the chain has no canonical payload envelopes.
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let snapshot = BeaconSnapshot {
|
||||
@@ -753,7 +758,11 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
))?;
|
||||
|
||||
Some(envelope)
|
||||
} else {
|
||||
} else if self
|
||||
.spec
|
||||
.fork_name_at_slot::<T::EthSpec>(beacon_block.slot())
|
||||
.gloas_enabled()
|
||||
{
|
||||
let fork_choice = self.canonical_head.fork_choice_read_lock();
|
||||
let latest_full_block_root_opt = fork_choice
|
||||
.latest_parent_full_block(new_view.head_block_root, &self.spec)?;
|
||||
@@ -772,7 +781,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
// TODO(gloas) handle the case where the non-finalized portion of the chain has no canonical payload envelopes.
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let (_, beacon_state) = self
|
||||
.store
|
||||
.get_advanced_hot_state(new_view.head_block_root, current_slot, state_root)?
|
||||
|
||||
@@ -1285,6 +1285,10 @@ impl ProtoArray {
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Option<Hash256>, Error> {
|
||||
for node in self.iter_nodes(&block_root) {
|
||||
if node.as_v29().is_err() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
if self.get_canonical_payload_status::<E>(
|
||||
node.root(),
|
||||
node.slot(),
|
||||
|
||||
Reference in New Issue
Block a user