mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
fix tests
This commit is contained in:
@@ -91,6 +91,7 @@ impl ForkChoiceTestDefinition {
|
||||
)
|
||||
.expect("should create fork choice struct");
|
||||
let equivocating_indices = BTreeSet::new();
|
||||
let mut latest_justified = self.justified_checkpoint.epoch;
|
||||
|
||||
for (op_index, op) in self.operations.into_iter().enumerate() {
|
||||
match op.clone() {
|
||||
@@ -100,6 +101,8 @@ impl ForkChoiceTestDefinition {
|
||||
justified_state_balances,
|
||||
expected_head,
|
||||
} => {
|
||||
let current_epoch =
|
||||
std::cmp::max(justified_checkpoint.epoch, latest_justified) + 3;
|
||||
let justified_balances =
|
||||
JustifiedBalances::from_effective_balances(justified_state_balances)
|
||||
.unwrap();
|
||||
@@ -110,7 +113,7 @@ impl ForkChoiceTestDefinition {
|
||||
&justified_balances,
|
||||
Hash256::zero(),
|
||||
&equivocating_indices,
|
||||
Slot::new(0),
|
||||
current_epoch.start_slot(MainnetEthSpec::slots_per_epoch()),
|
||||
&spec,
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
@@ -131,6 +134,8 @@ impl ForkChoiceTestDefinition {
|
||||
expected_head,
|
||||
proposer_boost_root,
|
||||
} => {
|
||||
let current_epoch =
|
||||
std::cmp::max(justified_checkpoint.epoch, latest_justified) + 3;
|
||||
let justified_balances =
|
||||
JustifiedBalances::from_effective_balances(justified_state_balances)
|
||||
.unwrap();
|
||||
@@ -141,7 +146,7 @@ impl ForkChoiceTestDefinition {
|
||||
&justified_balances,
|
||||
proposer_boost_root,
|
||||
&equivocating_indices,
|
||||
Slot::new(0),
|
||||
current_epoch.start_slot(MainnetEthSpec::slots_per_epoch()),
|
||||
&spec,
|
||||
)
|
||||
.unwrap_or_else(|e| {
|
||||
@@ -160,6 +165,8 @@ impl ForkChoiceTestDefinition {
|
||||
finalized_checkpoint,
|
||||
justified_state_balances,
|
||||
} => {
|
||||
let current_epoch =
|
||||
std::cmp::max(justified_checkpoint.epoch, latest_justified) + 3;
|
||||
let justified_balances =
|
||||
JustifiedBalances::from_effective_balances(justified_state_balances)
|
||||
.unwrap();
|
||||
@@ -169,7 +176,7 @@ impl ForkChoiceTestDefinition {
|
||||
&justified_balances,
|
||||
Hash256::zero(),
|
||||
&equivocating_indices,
|
||||
Slot::new(0),
|
||||
current_epoch.start_slot(MainnetEthSpec::slots_per_epoch()),
|
||||
&spec,
|
||||
);
|
||||
|
||||
@@ -188,6 +195,7 @@ impl ForkChoiceTestDefinition {
|
||||
justified_checkpoint,
|
||||
finalized_checkpoint,
|
||||
} => {
|
||||
latest_justified = std::cmp::max(justified_checkpoint.epoch, latest_justified);
|
||||
let block = Block {
|
||||
slot,
|
||||
root,
|
||||
|
||||
Reference in New Issue
Block a user