Skip to content

Commit

Permalink
Removes cap-accounts-data-len bits when constructing a new Bank (sola…
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Jan 8, 2024
1 parent 2082f8b commit 40e4103
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1317,15 +1317,7 @@ impl Bank {
.map(|drop_callback| drop_callback.clone_box()),
)),
freeze_started: AtomicBool::new(false),
cost_tracker: RwLock::new(CostTracker::new_with_account_data_size_limit(
feature_set
.is_active(&feature_set::cap_accounts_data_len::id())
.then(|| {
parent
.accounts_data_size_limit()
.saturating_sub(accounts_data_size_initial)
}),
)),
cost_tracker: RwLock::new(CostTracker::default()),
sysvar_cache: RwLock::new(SysvarCache::default()),
accounts_data_size_initial,
accounts_data_size_delta_on_chain: AtomicI64::new(0),
Expand Down Expand Up @@ -6623,16 +6615,6 @@ impl Bank {
&self.runtime_config.compute_budget.unwrap_or_default(),
false, /* debugging_features */
));

if self
.feature_set
.is_active(&feature_set::cap_accounts_data_len::id())
{
self.cost_tracker = RwLock::new(CostTracker::new_with_account_data_size_limit(Some(
self.accounts_data_size_limit()
.saturating_sub(self.accounts_data_size_initial),
)));
}
}

pub fn set_inflation(&self, inflation: Inflation) {
Expand Down Expand Up @@ -7860,11 +7842,6 @@ impl Bank {
);
}

if new_feature_activations.contains(&feature_set::cap_accounts_data_len::id()) {
const ACCOUNTS_DATA_LEN: u64 = 50_000_000_000;
self.accounts_data_size_initial = ACCOUNTS_DATA_LEN;
}

if new_feature_activations.contains(&feature_set::update_hashes_per_tick::id()) {
self.apply_updated_hashes_per_tick(DEFAULT_HASHES_PER_TICK);
}
Expand Down

0 comments on commit 40e4103

Please sign in to comment.