@@ -725,11 +725,17 @@ async fn success_with_small_preferred_withdraw() {
725
725
tokens_to_burn,
726
726
) = setup_for_withdraw ( spl_token:: id ( ) ) . await ;
727
727
728
+ let last_blockhash = context
729
+ . banks_client
730
+ . get_new_latest_blockhash ( & context. last_blockhash )
731
+ . await
732
+ . unwrap ( ) ;
733
+
728
734
// make pool tokens very valuable, so it isn't possible to exactly get down to the minimum
729
735
transfer (
730
736
& mut context. banks_client ,
731
737
& context. payer ,
732
- & context . last_blockhash ,
738
+ & last_blockhash,
733
739
& stake_pool_accounts. reserve_stake . pubkey ( ) ,
734
740
deposit_info. stake_lamports * 5 , // each pool token is worth more than one lamport
735
741
)
@@ -738,7 +744,7 @@ async fn success_with_small_preferred_withdraw() {
738
744
. update_all (
739
745
& mut context. banks_client ,
740
746
& context. payer ,
741
- & context . last_blockhash ,
747
+ & last_blockhash,
742
748
& [ validator_stake. vote . pubkey ( ) ] ,
743
749
false ,
744
750
)
@@ -747,7 +753,7 @@ async fn success_with_small_preferred_withdraw() {
747
753
let preferred_validator = simple_add_validator_to_pool (
748
754
& mut context. banks_client ,
749
755
& context. payer ,
750
- & context . last_blockhash ,
756
+ & last_blockhash,
751
757
& stake_pool_accounts,
752
758
None ,
753
759
)
@@ -757,15 +763,15 @@ async fn success_with_small_preferred_withdraw() {
757
763
. set_preferred_validator (
758
764
& mut context. banks_client ,
759
765
& context. payer ,
760
- & context . last_blockhash ,
766
+ & last_blockhash,
761
767
instruction:: PreferredValidatorType :: Withdraw ,
762
768
Some ( preferred_validator. vote . pubkey ( ) ) ,
763
769
)
764
770
. await ;
765
771
766
772
let last_blockhash = context
767
773
. banks_client
768
- . get_new_latest_blockhash ( & context . last_blockhash )
774
+ . get_new_latest_blockhash ( & last_blockhash)
769
775
. await
770
776
. unwrap ( ) ;
771
777
0 commit comments