Fix compile error in fork choice tests

This commit is contained in:
Paul Hauner
2020-01-17 16:17:39 +11:00
parent 268dd064bd
commit 10d37b26dc
2 changed files with 1 additions and 5 deletions

View File

@@ -37,7 +37,6 @@ pub enum Operation {
target_epoch: Epoch, target_epoch: Epoch,
}, },
Prune { Prune {
finalized_epoch: Epoch,
finalized_root: Hash256, finalized_root: Hash256,
prune_threshold: usize, prune_threshold: usize,
expected_len: usize, expected_len: usize,
@@ -141,14 +140,13 @@ impl ForkChoiceTestDefinition {
check_bytes_round_trip(&fork_choice); check_bytes_round_trip(&fork_choice);
} }
Operation::Prune { Operation::Prune {
finalized_epoch,
finalized_root, finalized_root,
prune_threshold, prune_threshold,
expected_len, expected_len,
} => { } => {
fork_choice.set_prune_threshold(prune_threshold); fork_choice.set_prune_threshold(prune_threshold);
fork_choice fork_choice
.update_finalized_root(finalized_epoch, finalized_root) .maybe_prune(finalized_root)
.expect("update_finalized_root op at index {} returned error"); .expect("update_finalized_root op at index {} returned error");
// Ensure that no pruning happened. // Ensure that no pruning happened.

View File

@@ -592,7 +592,6 @@ pub fn get_votes_test_definition() -> ForkChoiceTestDefinition {
// Ensure that pruning below the prune threshold does not prune. // Ensure that pruning below the prune threshold does not prune.
ops.push(Operation::Prune { ops.push(Operation::Prune {
finalized_epoch: Epoch::new(2),
finalized_root: get_hash(5), finalized_root: get_hash(5),
prune_threshold: usize::max_value(), prune_threshold: usize::max_value(),
expected_len: 11, expected_len: 11,
@@ -626,7 +625,6 @@ pub fn get_votes_test_definition() -> ForkChoiceTestDefinition {
// / \ // / \
// 9 10 // 9 10
ops.push(Operation::Prune { ops.push(Operation::Prune {
finalized_epoch: Epoch::new(2),
finalized_root: get_hash(5), finalized_root: get_hash(5),
prune_threshold: 1, prune_threshold: 1,
expected_len: 6, expected_len: 6,