Update fork choice

This commit is contained in:
Eitan Seri-Levi
2025-01-26 10:52:44 +03:00
parent 77551ea1b7
commit d3368f59a3
10 changed files with 46 additions and 32 deletions

View File

@@ -370,6 +370,7 @@ impl ProtoArrayForkChoice {
finalized_checkpoint: Checkpoint,
current_epoch_shuffling_id: AttestationShufflingId,
next_epoch_shuffling_id: AttestationShufflingId,
unsatisfied_inclusion_list_block: Hash256,
execution_status: ExecutionStatus,
) -> Result<Self, String> {
let mut proto_array = ProtoArray {
@@ -378,6 +379,7 @@ impl ProtoArrayForkChoice {
finalized_checkpoint,
nodes: Vec::with_capacity(1),
indices: HashMap::with_capacity(1),
unsatisfied_inclusion_list_block,
previous_proposer_boost: ProposerBoost::default(),
};
@@ -467,7 +469,6 @@ impl ProtoArrayForkChoice {
justified_state_balances: &JustifiedBalances,
proposer_boost_root: Hash256,
equivocating_indices: &BTreeSet<u64>,
unsatisfied_inclusion_list_block: Hash256,
current_slot: Slot,
spec: &ChainSpec,
) -> Result<Hash256, String> {
@@ -490,7 +491,6 @@ impl ProtoArrayForkChoice {
finalized_checkpoint,
new_balances,
proposer_boost_root,
unsatisfied_inclusion_list_block,
current_slot,
spec,
)
@@ -1033,6 +1033,7 @@ mod test_compute_deltas {
genesis_checkpoint,
junk_shuffling_id.clone(),
junk_shuffling_id.clone(),
Hash256::ZERO,
execution_status,
)
.unwrap();
@@ -1159,6 +1160,7 @@ mod test_compute_deltas {
genesis_checkpoint,
junk_shuffling_id.clone(),
junk_shuffling_id.clone(),
Hash256::ZERO,
execution_status,
)
.unwrap();