Simplify account.rent_epoch handling for sysvar rent (#16049)
* Add some code for special local testing * Add comment to store_account_and_update_capitalization * Simplify account.rent_epoch handling for sysvar rent * Introduce *_for_test functions * Add deprecation messages to existing api
This commit is contained in:
@@ -19,7 +19,7 @@ use solana_sdk::{
|
||||
account::{Account, AccountSharedData},
|
||||
account_utils::StateMut,
|
||||
bpf_loader_upgradeable::{self, UpgradeableLoaderState},
|
||||
clock::Slot,
|
||||
clock::{Slot, INITIAL_RENT_EPOCH},
|
||||
feature_set::{self, FeatureSet},
|
||||
fee_calculator::{FeeCalculator, FeeConfig},
|
||||
genesis_config::ClusterType,
|
||||
@@ -944,7 +944,7 @@ impl Accounts {
|
||||
_ => panic!("unexpected nonce_rollback condition"),
|
||||
}
|
||||
}
|
||||
if account.rent_epoch == 0 {
|
||||
if account.rent_epoch == INITIAL_RENT_EPOCH {
|
||||
loaded_transaction.rent +=
|
||||
rent_collector.collect_from_created_account(&key, account);
|
||||
}
|
||||
|
Reference in New Issue
Block a user