Skip to content

Commit 7c7c426

Browse files
joncinqueHaoranYi
authored and
HaoranYi
committed
stake-pool: Refresh blockhash earlier (solana-labs#3988)
1 parent d4b2b39 commit 7c7c426

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

stake-pool/program/tests/withdraw.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -632,22 +632,22 @@ async fn fail_with_not_enough_tokens() {
632632
tokens_to_burn,
633633
) = setup_for_withdraw(spl_token::id()).await;
634634

635+
let last_blockhash = context
636+
.banks_client
637+
.get_new_latest_blockhash(&context.last_blockhash)
638+
.await
639+
.unwrap();
640+
635641
// Empty validator stake account
636642
let empty_stake_account = simple_add_validator_to_pool(
637643
&mut context.banks_client,
638644
&context.payer,
639-
&context.last_blockhash,
645+
&last_blockhash,
640646
&stake_pool_accounts,
641647
None,
642648
)
643649
.await;
644650

645-
let last_blockhash = context
646-
.banks_client
647-
.get_new_latest_blockhash(&context.last_blockhash)
648-
.await
649-
.unwrap();
650-
651651
let new_authority = Pubkey::new_unique();
652652
let error = stake_pool_accounts
653653
.withdraw_stake(

0 commit comments

Comments
 (0)