@@ -751,21 +751,24 @@ async fn success_with_small_preferred_withdraw() {
751
751
)
752
752
. await ;
753
753
754
+ let last_blockhash = context
755
+ . banks_client
756
+ . get_new_latest_blockhash ( & context. last_blockhash )
757
+ . await
758
+ . unwrap ( ) ;
759
+
754
760
// add a tiny bit of stake, less than lamports per pool token to preferred validator
755
761
let rent = context. banks_client . get_rent ( ) . await . unwrap ( ) ;
756
762
let rent_exempt = rent. minimum_balance ( std:: mem:: size_of :: < stake:: state:: StakeState > ( ) ) ;
757
- let stake_minimum_delegation = stake_get_minimum_delegation (
758
- & mut context. banks_client ,
759
- & context. payer ,
760
- & context. last_blockhash ,
761
- )
762
- . await ;
763
+ let stake_minimum_delegation =
764
+ stake_get_minimum_delegation ( & mut context. banks_client , & context. payer , & last_blockhash)
765
+ . await ;
763
766
let minimum_lamports = stake_minimum_delegation + rent_exempt;
764
767
765
768
simple_deposit_stake (
766
769
& mut context. banks_client ,
767
770
& context. payer ,
768
- & context . last_blockhash ,
771
+ & last_blockhash,
769
772
& stake_pool_accounts,
770
773
& preferred_validator,
771
774
stake_minimum_delegation + 1 , // stake_rent gets deposited too
@@ -778,7 +781,7 @@ async fn success_with_small_preferred_withdraw() {
778
781
. decrease_validator_stake (
779
782
& mut context. banks_client ,
780
783
& context. payer ,
781
- & context . last_blockhash ,
784
+ & last_blockhash,
782
785
& preferred_validator. stake_account ,
783
786
& preferred_validator. transient_stake_account ,
784
787
minimum_lamports,
@@ -799,7 +802,7 @@ async fn success_with_small_preferred_withdraw() {
799
802
. update_all (
800
803
& mut context. banks_client ,
801
804
& context. payer ,
802
- & context . last_blockhash ,
805
+ & last_blockhash,
803
806
& [
804
807
validator_stake. vote . pubkey ( ) ,
805
808
preferred_validator. vote . pubkey ( ) ,
@@ -814,7 +817,7 @@ async fn success_with_small_preferred_withdraw() {
814
817
. withdraw_stake (
815
818
& mut context. banks_client ,
816
819
& context. payer ,
817
- & context . last_blockhash ,
820
+ & last_blockhash,
818
821
& user_stake_recipient. pubkey ( ) ,
819
822
& user_transfer_authority,
820
823
& deposit_info. pool_account . pubkey ( ) ,
@@ -831,7 +834,7 @@ async fn success_with_small_preferred_withdraw() {
831
834
. withdraw_stake (
832
835
& mut context. banks_client ,
833
836
& context. payer ,
834
- & context . last_blockhash ,
837
+ & last_blockhash,
835
838
& user_stake_recipient. pubkey ( ) ,
836
839
& user_transfer_authority,
837
840
& deposit_info. pool_account . pubkey ( ) ,
0 commit comments