Remove payload attestation queueing and more cleanups

This commit is contained in:
Michael Sproul
2026-04-01 11:17:33 +11:00
parent 1ee2ce4258
commit bc6cf0f882
5 changed files with 34 additions and 99 deletions

View File

@@ -117,10 +117,10 @@ pub struct ProtoNode {
pub finalized_checkpoint: Checkpoint,
#[superstruct(getter(copy))]
pub weight: u64,
#[superstruct(getter(copy))]
#[superstruct(only(V17), partial_getter(copy))]
#[ssz(with = "four_byte_option_usize")]
pub best_child: Option<usize>,
#[superstruct(getter(copy))]
#[superstruct(only(V17), partial_getter(copy))]
#[ssz(with = "four_byte_option_usize")]
pub best_descendant: Option<usize>,
/// Indicates if an execution node has marked this block as valid. Also contains the execution
@@ -614,8 +614,6 @@ impl ProtoArray {
justified_checkpoint: block.justified_checkpoint,
finalized_checkpoint: block.finalized_checkpoint,
weight: 0,
best_child: None,
best_descendant: None,
unrealized_justified_checkpoint: block.unrealized_justified_checkpoint,
unrealized_finalized_checkpoint: block.unrealized_finalized_checkpoint,
parent_payload_status,

View File

@@ -997,7 +997,11 @@ impl ProtoArrayForkChoice {
/// Returns the `block.execution_status` field, if the block is present.
pub fn get_block_execution_status(&self, block_root: &Hash256) -> Option<ExecutionStatus> {
let block = self.get_proto_node(block_root)?;
block.execution_status().ok()
Some(
block
.execution_status()
.unwrap_or_else(|_| ExecutionStatus::irrelevant()),
)
}
/// Returns whether the execution payload for a block has been received.