Remove feature switch for demoting sysvar write locks (#18373)

This commit is contained in:
Justin Starry
2021-07-06 16:22:22 -05:00
committed by GitHub
parent 5dd399dafa
commit 100fabf469
12 changed files with 71 additions and 186 deletions

View File

@ -27,7 +27,6 @@ pub const ACCOUNT_MAX_COST: u64 = 100_000_000;
pub const BLOCK_MAX_COST: u64 = 2_500_000_000;
const MAX_WRITABLE_ACCOUNTS: usize = 256;
const DEMOTE_SYSVAR_WRITE_LOCKS: bool = true;
// cost of transaction is made of account_access_cost and instruction execution_cost
// where
@ -97,7 +96,7 @@ impl CostModel {
let message = transaction.message();
message.account_keys.iter().enumerate().for_each(|(i, k)| {
let is_signer = message.is_signer(i);
let is_writable = message.is_writable(i, DEMOTE_SYSVAR_WRITE_LOCKS);
let is_writable = message.is_writable(i);
if is_signer && is_writable {
self.transaction_cost.writable_accounts.push(*k);