program-test: Fix warp and staking issue (#16002)
Since program-test creates a test genesis and then adds fees and rent, some of the genesis accounts get rent-collected after warping. Most notably, `StakeConfig` gets rent-collected, causing any stake operations to fail after warp. This fix creates genesis with the `Rent` and `FeeRateGovernor` actually used by the bank.
This commit is contained in:
@ -164,6 +164,8 @@ async fn stake_rewards_from_warp() {
|
||||
let program_test = ProgramTest::default();
|
||||
|
||||
let mut context = program_test.start_with_context().await;
|
||||
// warp once to make sure stake config doesn't get rent-collected
|
||||
context.warp_to_slot(100).unwrap();
|
||||
let mut instructions = vec![];
|
||||
let validator_keypair = Keypair::new();
|
||||
instructions.push(system_instruction::create_account(
|
||||
|
Reference in New Issue
Block a user