Cleanup unsupported sysvars (#16390)

* Cleanup unsupported sysvars

* fix ser description
This commit is contained in:
Jack May
2021-04-06 00:08:03 -07:00
committed by GitHub
parent 03d3ae1cb9
commit 92f4018b07
12 changed files with 90 additions and 39 deletions

View File

@ -24,6 +24,7 @@ use solana_sdk::{
pubkey::Pubkey,
rent::Rent,
system_program,
sysvar::instructions,
transaction::TransactionError,
};
use std::{
@ -1049,9 +1050,9 @@ impl MessageProcessor {
// before the account pre-values are taken care of
if feature_set.is_active(&instructions_sysvar_enabled::id()) {
for (i, key) in message.account_keys.iter().enumerate() {
if solana_sdk::sysvar::instructions::check_id(key) {
if instructions::check_id(key) {
let mut mut_account_ref = accounts[i].borrow_mut();
solana_sdk::sysvar::instructions::store_current_index(
instructions::store_current_index(
mut_account_ref.data_as_mut_slice(),
instruction_index as u16,
);