bug: sysvar::Instructions is not owned by Sysvar1111111111111111111111111111111111111 (#19242)

* Fix instructions sysvar owner

* Update feature switch address

Co-authored-by: Justin Starry <justin@solana.com>
This commit is contained in:
jon-chuang
2021-08-20 23:32:28 +08:00
committed by GitHub
parent 3be5715f45
commit 3e5ba8dcaa
3 changed files with 22 additions and 2 deletions

View File

@ -10,6 +10,7 @@ use solana_program::{
msg,
program_error::ProgramError,
pubkey::Pubkey,
system_program,
sysvar::{
self, clock::Clock, epoch_schedule::EpochSchedule, instructions, rent::Rent,
slot_hashes::SlotHashes, slot_history::SlotHistory, stake_history::StakeHistory, Sysvar,
@ -46,6 +47,7 @@ pub fn process_instruction(
// Instructions
msg!("Instructions identifier:");
sysvar::instructions::id().log();
assert_eq!(*accounts[4].owner, system_program::id());
let index = instructions::load_current_index(&accounts[4].try_borrow_data()?);
assert_eq!(0, index);