Removes remaining unused accounts data len bits (#34732)

This commit is contained in:
Brooks 2024-01-10 18:16:56 -05:00 committed by GitHub
parent 7ee9d9a1f2
commit e9a6bb35e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 24 deletions

View File

@ -185,7 +185,6 @@ impl<'a> InvokeContext<'a> {
feature_set: Arc<FeatureSet>,
blockhash: Hash,
lamports_per_signature: u64,
_prev_accounts_data_len: u64,
) -> Self {
Self {
transaction_context,
@ -681,7 +680,6 @@ macro_rules! with_mock_invoke_context {
Arc::new(FeatureSet::all_enabled()),
Hash::default(),
0,
0,
);
};
}

View File

@ -35,13 +35,6 @@ impl ::solana_frozen_abi::abi_example::AbiExample for MessageProcessor {
}
}
/// Resultant information gathered from calling process_message()
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
pub struct ProcessedMessageInfo {
/// The change in accounts data len
pub accounts_data_len_delta: i64,
}
impl MessageProcessor {
/// Process a message.
/// This method calls each instruction in the message over the set of loaded accounts.
@ -62,9 +55,8 @@ impl MessageProcessor {
sysvar_cache: &SysvarCache,
blockhash: Hash,
lamports_per_signature: u64,
current_accounts_data_len: u64,
accumulated_consumed_units: &mut u64,
) -> Result<ProcessedMessageInfo, TransactionError> {
) -> Result<(), TransactionError> {
let mut invoke_context = InvokeContext::new(
transaction_context,
sysvar_cache,
@ -75,7 +67,6 @@ impl MessageProcessor {
feature_set,
blockhash,
lamports_per_signature,
current_accounts_data_len,
);
debug_assert_eq!(program_indices.len(), message.instructions().len());
@ -174,9 +165,7 @@ impl MessageProcessor {
result
.map_err(|err| TransactionError::InstructionError(instruction_index as u8, err))?;
}
Ok(ProcessedMessageInfo {
accounts_data_len_delta: 0, // unused
})
Ok(())
}
}
@ -313,7 +302,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert!(result.is_ok());
@ -363,7 +351,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert_eq!(
@ -403,7 +390,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert_eq!(
@ -533,7 +519,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert_eq!(
@ -567,7 +552,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert!(result.is_ok());
@ -598,7 +582,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);
assert!(result.is_ok());
@ -686,7 +669,6 @@ mod tests {
&sysvar_cache,
Hash::default(),
0,
0,
&mut 0,
);

View File

@ -4765,7 +4765,6 @@ impl Bank {
log_messages_bytes_limit: Option<usize>,
programs_loaded_for_tx_batch: &LoadedProgramsForTxBatch,
) -> TransactionExecutionResult {
let prev_accounts_data_len = self.load_accounts_data_size();
let transaction_accounts = std::mem::take(&mut loaded_transaction.accounts);
fn transaction_accounts_lamports_sum(
@ -4827,7 +4826,6 @@ impl Bank {
&self.sysvar_cache.read().unwrap(),
blockhash,
lamports_per_signature,
prev_accounts_data_len,
&mut executed_units,
);
process_message_time.stop();