mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 04:42:34 +00:00
Fix compile error in fork choice tests
This commit is contained in:
@@ -37,7 +37,6 @@ pub enum Operation {
|
||||
target_epoch: Epoch,
|
||||
},
|
||||
Prune {
|
||||
finalized_epoch: Epoch,
|
||||
finalized_root: Hash256,
|
||||
prune_threshold: usize,
|
||||
expected_len: usize,
|
||||
@@ -141,14 +140,13 @@ impl ForkChoiceTestDefinition {
|
||||
check_bytes_round_trip(&fork_choice);
|
||||
}
|
||||
Operation::Prune {
|
||||
finalized_epoch,
|
||||
finalized_root,
|
||||
prune_threshold,
|
||||
expected_len,
|
||||
} => {
|
||||
fork_choice.set_prune_threshold(prune_threshold);
|
||||
fork_choice
|
||||
.update_finalized_root(finalized_epoch, finalized_root)
|
||||
.maybe_prune(finalized_root)
|
||||
.expect("update_finalized_root op at index {} returned error");
|
||||
|
||||
// Ensure that no pruning happened.
|
||||
|
||||
@@ -592,7 +592,6 @@ pub fn get_votes_test_definition() -> ForkChoiceTestDefinition {
|
||||
|
||||
// Ensure that pruning below the prune threshold does not prune.
|
||||
ops.push(Operation::Prune {
|
||||
finalized_epoch: Epoch::new(2),
|
||||
finalized_root: get_hash(5),
|
||||
prune_threshold: usize::max_value(),
|
||||
expected_len: 11,
|
||||
@@ -626,7 +625,6 @@ pub fn get_votes_test_definition() -> ForkChoiceTestDefinition {
|
||||
// / \
|
||||
// 9 10
|
||||
ops.push(Operation::Prune {
|
||||
finalized_epoch: Epoch::new(2),
|
||||
finalized_root: get_hash(5),
|
||||
prune_threshold: 1,
|
||||
expected_len: 6,
|
||||
|
||||
Reference in New Issue
Block a user