Skip to content

Commit

Permalink
Fix runtime test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Sep 18, 2023
1 parent 0599c51 commit e201022
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions runtime/tests/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,21 @@ fn test_stake_account_lifetime() {
let split_stake_keypair = Keypair::new();
let split_stake_pubkey = split_stake_keypair.pubkey();

bank.transfer(
stake_rent_exempt_reserve,
&mint_keypair,
&split_stake_pubkey,
)
.unwrap();
let bank_client = BankClient::new_shared(bank.clone());

// Test split
let split_starting_delegation = stake_minimum_delegation + bonus_delegation;
let split_starting_balance = split_starting_delegation + stake_rent_exempt_reserve;
let message = Message::new(
&stake_instruction::split(
&stake_pubkey,
&stake_pubkey,
split_starting_balance,
split_starting_delegation,
&split_stake_pubkey,
),
Some(&mint_pubkey),
Expand All @@ -451,7 +457,7 @@ fn test_stake_account_lifetime() {
get_staked(&bank, &split_stake_pubkey),
split_starting_delegation,
);
let stake_remaining_balance = balance - split_starting_balance;
let stake_remaining_balance = balance - split_starting_delegation;

// Deactivate the split
let message = Message::new(
Expand Down

0 comments on commit e201022

Please sign in to comment.