Implement get_attester_head logic

This commit is contained in:
Eitan Seri-Levi
2025-01-16 13:19:07 +07:00
parent 3069b36243
commit f87f83873a
9 changed files with 94 additions and 14 deletions

View File

@@ -489,6 +489,7 @@ where
store.justified_balances(),
store.proposer_boost_root(),
store.equivocating_indices(),
store.unsatisfied_inclusion_list_block(),
current_slot,
spec,
)?;
@@ -626,6 +627,14 @@ where
.map_err(Error::FailedToProcessInvalidExecutionPayload)
}
// TODO(focil) add documentation
pub fn on_invalid_inclusion_list_payload(
&mut self,
block_root: Hash256,
) {
self.fc_store.set_unsatisfied_inclusion_list_block(block_root);
}
/// Add `block` to the fork choice DAG.
///
/// - `block_root` is the root of `block.

View File

@@ -79,4 +79,10 @@ pub trait ForkChoiceStore<E: EthSpec>: Sized {
/// Adds to the set of equivocating indices.
fn extend_equivocating_indices(&mut self, indices: impl IntoIterator<Item = u64>);
/// Returns the `unsatisfied_inclusion_list_block`.
fn unsatisfied_inclusion_list_block(&self) -> Hash256;
/// Sets the `unsatisfied_inclusion_list_block`.
fn set_unsatisfied_inclusion_list_block(&mut self, block_root: Hash256);
}