mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Implement get_attester_head logic
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user