stake-pool: Refresh blockhash earlier (#3988)
This commit is contained in:
parent
88684d52a2
commit
809bcfee41
|
@ -632,22 +632,22 @@ async fn fail_with_not_enough_tokens() {
|
||||||
tokens_to_burn,
|
tokens_to_burn,
|
||||||
) = setup_for_withdraw(spl_token::id()).await;
|
) = setup_for_withdraw(spl_token::id()).await;
|
||||||
|
|
||||||
// Empty validator stake account
|
|
||||||
let empty_stake_account = simple_add_validator_to_pool(
|
|
||||||
&mut context.banks_client,
|
|
||||||
&context.payer,
|
|
||||||
&context.last_blockhash,
|
|
||||||
&stake_pool_accounts,
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
.await;
|
|
||||||
|
|
||||||
let last_blockhash = context
|
let last_blockhash = context
|
||||||
.banks_client
|
.banks_client
|
||||||
.get_new_latest_blockhash(&context.last_blockhash)
|
.get_new_latest_blockhash(&context.last_blockhash)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Empty validator stake account
|
||||||
|
let empty_stake_account = simple_add_validator_to_pool(
|
||||||
|
&mut context.banks_client,
|
||||||
|
&context.payer,
|
||||||
|
&last_blockhash,
|
||||||
|
&stake_pool_accounts,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.await;
|
||||||
|
|
||||||
let new_authority = Pubkey::new_unique();
|
let new_authority = Pubkey::new_unique();
|
||||||
let error = stake_pool_accounts
|
let error = stake_pool_accounts
|
||||||
.withdraw_stake(
|
.withdraw_stake(
|
||||||
|
|
Loading…
Reference in New Issue