deprecate fees sysvar (#18960)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
extern crate solana_program;
|
||||
#[allow(deprecated)]
|
||||
use solana_program::sysvar::recent_blockhashes::RecentBlockhashes;
|
||||
use solana_program::sysvar::{fees::Fees, recent_blockhashes::RecentBlockhashes};
|
||||
use solana_program::{
|
||||
account_info::AccountInfo,
|
||||
entrypoint,
|
||||
@@ -12,7 +12,7 @@ use solana_program::{
|
||||
program_error::ProgramError,
|
||||
pubkey::Pubkey,
|
||||
sysvar::{
|
||||
self, clock::Clock, epoch_schedule::EpochSchedule, fees::Fees, instructions, rent::Rent,
|
||||
self, clock::Clock, epoch_schedule::EpochSchedule, instructions, rent::Rent,
|
||||
slot_hashes::SlotHashes, slot_history::SlotHistory, stake_history::StakeHistory, Sysvar,
|
||||
},
|
||||
};
|
||||
@@ -45,6 +45,7 @@ pub fn process_instruction(
|
||||
}
|
||||
|
||||
// Fees
|
||||
#[allow(deprecated)]
|
||||
{
|
||||
msg!("Fees identifier:");
|
||||
sysvar::fees::id().log();
|
||||
|
@@ -1,13 +1,11 @@
|
||||
use solana_bpf_rust_sysvar::process_instruction;
|
||||
use solana_program_test::*;
|
||||
use solana_sdk::sysvar::{fees, recent_blockhashes};
|
||||
use solana_sdk::{
|
||||
instruction::{AccountMeta, Instruction},
|
||||
pubkey::Pubkey,
|
||||
signature::Signer,
|
||||
sysvar::{
|
||||
clock, epoch_schedule, fees, instructions, recent_blockhashes, rent, slot_hashes,
|
||||
slot_history, stake_history,
|
||||
},
|
||||
sysvar::{clock, epoch_schedule, instructions, rent, slot_hashes, slot_history, stake_history},
|
||||
transaction::Transaction,
|
||||
};
|
||||
|
||||
@@ -30,8 +28,10 @@ async fn test_sysvars() {
|
||||
AccountMeta::new(Pubkey::new_unique(), false),
|
||||
AccountMeta::new_readonly(clock::id(), false),
|
||||
AccountMeta::new_readonly(epoch_schedule::id(), false),
|
||||
#[allow(deprecated)]
|
||||
AccountMeta::new_readonly(fees::id(), false),
|
||||
AccountMeta::new_readonly(instructions::id(), false),
|
||||
#[allow(deprecated)]
|
||||
AccountMeta::new_readonly(recent_blockhashes::id(), false),
|
||||
AccountMeta::new_readonly(rent::id(), false),
|
||||
AccountMeta::new_readonly(slot_hashes::id(), false),
|
||||
|
Reference in New Issue
Block a user