gloas-head-block-number

This commit is contained in:
Eitan Seri-Levi
2026-05-31 12:28:33 +03:00
parent 1e940fc78c
commit a09d3f26a4
2 changed files with 180 additions and 0 deletions

View File

@@ -124,6 +124,14 @@ pub enum Operation {
#[serde(default)]
proposer_boost_root: Option<Hash256>,
},
/// Assert the root returned by `latest_parent_full_block` for `block_root`.
AssertLatestFullPayloadBlock {
block_root: Hash256,
expected: Option<Hash256>,
/// Override the proposer boost root. Defaults to `Hash256::zero()`.
#[serde(default)]
proposer_boost_root: Option<Hash256>,
},
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -606,6 +614,24 @@ impl ForkChoiceTestDefinition {
op_index
);
}
Operation::AssertLatestFullPayloadBlock {
block_root,
expected,
proposer_boost_root,
} => {
let actual = fork_choice
.latest_parent_full_block::<MainnetEthSpec>(
block_root,
proposer_boost_root.unwrap_or_else(Hash256::zero),
&spec,
)
.unwrap();
assert_eq!(
actual, expected,
"latest_parent_full_block mismatch at op index {}",
op_index
);
}
}
}
}