Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Dec 7, 2024
1 parent aea9390 commit fbfd5f0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/tests/steward/test_algorithms.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Unit tests for scoring, instant unstake, and delegation methods
use anchor_lang::AnchorSerialize;
use jito_steward::{
constants::{EPOCH_DEFAULT, LAMPORT_BALANCE_DEFAULT, SORTED_INDEX_DEFAULT, TVC_ACTIVATION_EPOCH},
constants::{
EPOCH_DEFAULT, LAMPORT_BALANCE_DEFAULT, SORTED_INDEX_DEFAULT, TVC_ACTIVATION_EPOCH,
},
delegation::{
decrease_stake_calculation, increase_stake_calculation, RebalanceType, UnstakeState,
},
Expand Down Expand Up @@ -746,7 +748,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 1000 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 1000,
cluster_history_slot_index: slot_index,
commission: 0,
Expand Down Expand Up @@ -782,7 +784,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 1000 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 1000,
cluster_history_slot_index: slot_index,
commission: 0,
Expand Down Expand Up @@ -815,7 +817,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 200 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 1000,
cluster_history_slot_index: slot_index,
commission: 99,
Expand Down Expand Up @@ -917,7 +919,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 1000 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 1000,
cluster_history_slot_index: slot_index,
commission: 100,
Expand Down Expand Up @@ -950,7 +952,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 1000 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 1000,
cluster_history_slot_index: slot_index,
commission: 0,
Expand Down Expand Up @@ -983,7 +985,7 @@ fn test_instant_unstake() {
epoch: current_epoch,
details: InstantUnstakeDetails {
epoch_credits_latest: 1000 * (TVC_MULTIPLIER as u64),
vote_account_last_update_slot: start_slot + 999,
vote_account_last_update_slot: end_slot,
total_blocks_latest: 0,
cluster_history_slot_index: slot_index,
commission: 0,
Expand Down

0 comments on commit fbfd5f0

Please sign in to comment.