Skip to content

Commit

Permalink
Cleanup - Feature Gate of `enable_early_verification_of_account_modif…
Browse files Browse the repository at this point in the history
…ications` (solana-labs#33579)

Cleans up the feature gate of enable_early_verification_of_account_modifications:
- Removes PreAccount
- Removes InvokeContext::pre_accounts and InvokeContext::rent
- Removes InvokeContext::verify() and InvokeContext::verify_and_update()
- Removes TransactionContext::is_early_verification_of_account_modifications_enabled()
- Removes TransactionAccounts::is_early_verification_of_account_modifications_enabled
- No longer optional: TransactionContext::rent
  • Loading branch information
Lichtso authored Oct 10, 2023
1 parent dc52201 commit cb695c7
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 1,188 deletions.
7 changes: 5 additions & 2 deletions accounts-db/src/transaction_results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,16 @@ pub fn inner_instructions_list_from_instruction_trace(

#[cfg(test)]
mod tests {
use {super::*, solana_sdk::transaction_context::TransactionContext};
use {
super::*,
solana_sdk::{sysvar::rent::Rent, transaction_context::TransactionContext},
};

#[test]
fn test_inner_instructions_list_from_instruction_trace() {
let instruction_trace = [1, 2, 1, 1, 2, 3, 2];
let mut transaction_context =
TransactionContext::new(vec![], None, 3, instruction_trace.len());
TransactionContext::new(vec![], Rent::default(), 3, instruction_trace.len());
for (index_in_trace, stack_height) in instruction_trace.into_iter().enumerate() {
while stack_height <= transaction_context.get_instruction_context_stack_height() {
transaction_context.pop().unwrap();
Expand Down
101 changes: 0 additions & 101 deletions program-runtime/benches/pre_account.rs

This file was deleted.

Loading

0 comments on commit cb695c7

Please sign in to comment.