Fix slow/stuck unstaking due to toggling in epoch (#13501)
* Fix slow/stuck unstaking due to toggling in epoch * nits * nits * Add stake_program_v2 feature status check to cli Co-authored-by: Tyera Eulberg <tyera@solana.com>
This commit is contained in:
@ -234,7 +234,10 @@ pub(crate) mod tests {
|
||||
let result: Vec<_> = epoch_stakes_and_lockouts(&bank, first_leader_schedule_epoch);
|
||||
assert_eq!(
|
||||
result,
|
||||
vec![(leader_stake.stake(first_leader_schedule_epoch, None), None)]
|
||||
vec![(
|
||||
leader_stake.stake(first_leader_schedule_epoch, None, true),
|
||||
None
|
||||
)]
|
||||
);
|
||||
|
||||
// epoch stakes and lockouts are saved off for the future epoch, should
|
||||
@ -244,8 +247,14 @@ pub(crate) mod tests {
|
||||
let stake_history =
|
||||
from_account::<StakeHistory>(&bank.get_account(&stake_history::id()).unwrap()).unwrap();
|
||||
let mut expected = vec![
|
||||
(leader_stake.stake(bank.epoch(), Some(&stake_history)), None),
|
||||
(other_stake.stake(bank.epoch(), Some(&stake_history)), None),
|
||||
(
|
||||
leader_stake.stake(bank.epoch(), Some(&stake_history), true),
|
||||
None,
|
||||
),
|
||||
(
|
||||
other_stake.stake(bank.epoch(), Some(&stake_history), true),
|
||||
None,
|
||||
),
|
||||
];
|
||||
|
||||
expected.sort();
|
||||
|
Reference in New Issue
Block a user