Skip to content

Commit

Permalink
test/ledger/finalize_block: fix slashing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Jul 18, 2023
1 parent ed57e33 commit 0c16a19
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2420,8 +2420,11 @@ mod test_finalize_block {
);

// Advance to the processing epoch
let votes = get_default_true_votes(&shell.wl_storage, Epoch::default());
loop {
let votes = get_default_true_votes(
&shell.wl_storage,
shell.wl_storage.storage.block.epoch,
);
next_block_for_inflation(
&mut shell,
pkh1.clone(),
Expand Down Expand Up @@ -2960,10 +2963,14 @@ mod test_finalize_block {
total_voting_power: Default::default(),
},
];
let votes = get_default_true_votes(
&shell.wl_storage,
shell.wl_storage.storage.block.epoch,
);
next_block_for_inflation(
&mut shell,
pkh1.clone(),
votes.clone(),
votes,
Some(misbehaviors),
);
assert_eq!(current_epoch.0, 7_u64);
Expand Down

0 comments on commit 0c16a19

Please sign in to comment.