From e201022f0e523838822076a45f90631216cb927a Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Sun, 10 Sep 2023 23:51:02 -0600 Subject: [PATCH] Fix runtime test --- runtime/tests/stake.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/runtime/tests/stake.rs b/runtime/tests/stake.rs index c260fead027308..7088e6438e1c22 100755 --- a/runtime/tests/stake.rs +++ b/runtime/tests/stake.rs @@ -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), @@ -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(