Refactoring fork choice to look more like the spec

This commit is contained in:
Michael Sproul
2026-03-24 15:58:54 +11:00
parent ce714710e9
commit 52e397f8c1
2 changed files with 130 additions and 110 deletions

View File

@@ -68,6 +68,13 @@ pub enum PayloadStatus {
Pending = 2,
}
/// Spec's `ForkChoiceNode` augmented with ProtoNode index.
pub struct IndexedForkChoiceNode {
root: Hash256,
node_index: usize,
payload_status: PayloadStatus,
}
impl ExecutionStatus {
pub fn is_execution_enabled(&self) -> bool {
!matches!(self, ExecutionStatus::Irrelevant(_))