Remove feature switch for demoting sysvar write locks (#18373)
This commit is contained in:
@ -19,7 +19,6 @@ use {
|
||||
clock::{Clock, Slot},
|
||||
entrypoint::{ProgramResult, SUCCESS},
|
||||
epoch_schedule::EpochSchedule,
|
||||
feature_set::demote_sysvar_write_locks,
|
||||
fee_calculator::{FeeCalculator, FeeRateGovernor},
|
||||
genesis_config::{ClusterType, GenesisConfig},
|
||||
hash::Hash,
|
||||
@ -259,14 +258,12 @@ impl solana_sdk::program_stubs::SyscallStubs for SyscallStubs {
|
||||
}
|
||||
panic!("Program id {} wasn't found in account_infos", program_id);
|
||||
};
|
||||
let demote_sysvar_write_locks =
|
||||
invoke_context.is_feature_active(&demote_sysvar_write_locks::id());
|
||||
// TODO don't have the caller's keyed_accounts so can't validate writer or signer escalation or deescalation yet
|
||||
let caller_privileges = message
|
||||
.account_keys
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, _)| message.is_writable(i, demote_sysvar_write_locks))
|
||||
.map(|(i, _)| message.is_writable(i))
|
||||
.collect::<Vec<bool>>();
|
||||
|
||||
stable_log::program_invoke(&logger, &program_id, invoke_context.invoke_depth());
|
||||
@ -337,7 +334,7 @@ impl solana_sdk::program_stubs::SyscallStubs for SyscallStubs {
|
||||
|
||||
// Copy writeable account modifications back into the caller's AccountInfos
|
||||
for (i, (pubkey, account)) in accounts.iter().enumerate().take(message.account_keys.len()) {
|
||||
if !message.is_writable(i, true) {
|
||||
if !message.is_writable(i) {
|
||||
continue;
|
||||
}
|
||||
for account_info in account_infos {
|
||||
|
Reference in New Issue
Block a user