checkpoint sync without alignment

This commit is contained in:
realbigsean
2023-06-09 12:03:59 -04:00
parent 8da95ac9c6
commit 9fa67ccb88
5 changed files with 22 additions and 50 deletions

View File

@@ -80,6 +80,7 @@ impl ForkChoiceTestDefinition {
let junk_shuffling_id =
AttestationShufflingId::from_components(Epoch::new(0), Hash256::zero());
let mut fork_choice = ProtoArrayForkChoice::new::<MainnetEthSpec>(
self.finalized_block_slot,
self.finalized_block_slot,
Hash256::zero(),
self.justified_checkpoint,

View File

@@ -345,6 +345,7 @@ pub struct ProtoArrayForkChoice {
impl ProtoArrayForkChoice {
#[allow(clippy::too_many_arguments)]
pub fn new<E: EthSpec>(
current_slot: Slot,
finalized_block_slot: Slot,
finalized_block_state_root: Hash256,
justified_checkpoint: Checkpoint,
@@ -380,7 +381,7 @@ impl ProtoArrayForkChoice {
};
proto_array
.on_block::<E>(block, finalized_block_slot)
.on_block::<E>(block, current_slot)
.map_err(|e| format!("Failed to add finalized block to proto_array: {:?}", e))?;
Ok(Self {
@@ -1108,6 +1109,7 @@ mod test_compute_deltas {
};
let mut fc = ProtoArrayForkChoice::new::<MainnetEthSpec>(
genesis_slot,
genesis_slot,
junk_state_root,
genesis_checkpoint,