deprecate fees sysvar (#18960)

This commit is contained in:
Jack May
2021-07-29 10:48:14 -07:00
committed by GitHub
parent da480bdb5f
commit dfbb0c559b
11 changed files with 98 additions and 88 deletions

View File

@ -1,17 +1,11 @@
#[allow(deprecated)]
use solana_sdk::sysvar::fees::Fees;
use {
solana_program_test::{processor, ProgramTest},
solana_sdk::{
account_info::AccountInfo,
clock::Clock,
entrypoint::ProgramResult,
epoch_schedule::EpochSchedule,
fee_calculator::FeeCalculator,
instruction::Instruction,
msg,
pubkey::Pubkey,
rent::Rent,
signature::Signer,
sysvar::{fees::Fees, Sysvar},
account_info::AccountInfo, clock::Clock, entrypoint::ProgramResult,
epoch_schedule::EpochSchedule, fee_calculator::FeeCalculator, instruction::Instruction,
msg, pubkey::Pubkey, rent::Rent, signature::Signer, sysvar::Sysvar,
transaction::Transaction,
},
};
@ -30,13 +24,16 @@ fn sysvar_getter_process_instruction(
let epoch_schedule = EpochSchedule::get()?;
assert_eq!(epoch_schedule, EpochSchedule::default());
let fees = Fees::get()?;
assert_eq!(
fees.fee_calculator,
FeeCalculator {
lamports_per_signature: 5000
}
);
#[allow(deprecated)]
{
let fees = Fees::get()?;
assert_eq!(
fees.fee_calculator,
FeeCalculator {
lamports_per_signature: 5000
}
);
}
let rent = Rent::get()?;
assert_eq!(rent, Rent::default());