Skip to content

Commit

Permalink
Clean up feature preventing new rent-paying accounts (solana-labs#26000)
Browse files Browse the repository at this point in the history
* Clean up require_rent_exempt_accounts feature

* Fix tests in bank_client, system_instruction_processor

* Fix tests in snapshot_utils

* Fix bank tests

* Ignore rent tests

* Fix stake-accounts tests
  • Loading branch information
CriesofCarrots committed Jun 16, 2022
1 parent bf9ca98 commit 752c851
Show file tree
Hide file tree
Showing 7 changed files with 404 additions and 246 deletions.
11 changes: 2 additions & 9 deletions runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,22 +427,15 @@ impl Accounts {
.map_err(|_| TransactionError::InsufficientFundsForFee)?;

let payer_post_rent_state = RentState::from_account(payer_account, &rent_collector.rent);
let rent_state_result = check_rent_state_with_account(
check_rent_state_with_account(
&payer_pre_rent_state,
&payer_post_rent_state,
payer_address,
payer_account,
feature_set
.is_active(&feature_set::include_account_index_in_rent_error::ID)
.then(|| payer_index),
);
// Feature gate only wraps the actual error return so that the metrics and debug
// logging generated by `check_rent_state_with_account()` can be examined before
// feature activation
if feature_set.is_active(&feature_set::require_rent_exempt_accounts::id()) {
rent_state_result?;
}
Ok(())
)
}

fn load_executable_accounts(
Expand Down
Loading

0 comments on commit 752c851

Please sign in to comment.