diff --git a/aptos-move/aptos-e2e-comparison-testing/src/execution.rs b/aptos-move/aptos-e2e-comparison-testing/src/execution.rs index 9e88073be6929..0e8d84ec9d2e2 100644 --- a/aptos-move/aptos-e2e-comparison-testing/src/execution.rs +++ b/aptos-move/aptos-e2e-comparison-testing/src/execution.rs @@ -17,7 +17,7 @@ use aptos_types::{ write_set::WriteSet, }; use aptos_validator_interface::AptosValidatorInterface; -use aptos_vm::{data_cache::AsMoveResolver, transaction_metadata::TransactionMetadata}; +use aptos_vm::data_cache::AsMoveResolver; use clap::ValueEnum; use itertools::Itertools; use move_core_types::{account_address::AccountAddress, language_storage::ModuleId}; @@ -362,7 +362,7 @@ impl Execution { load_packages_to_executor(&mut executor, package_info, compiled_package_cache); } let mut senders = vec![sender]; - senders.extend(TransactionMetadata::new(signed_trans).secondary_signers); + senders.extend(signed_trans.authenticator().secondary_signer_addresses()); let enable_v7 = |features: &mut Features| { if v2_flag { features.enable(FeatureFlag::VM_BINARY_FORMAT_V7); diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index 771e8ee351590..eeba9494345f7 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -1692,7 +1692,7 @@ impl AptosVM { txn: &SignedTransaction, log_context: &AdapterLogSchema, ) -> (VMStatus, VMOutput) { - let balance = TransactionMetadata::new(txn).max_gas_amount(); + let balance = txn.max_gas_amount().into(); // TODO: would we end up having a diverging behavior by creating the gas meter at an earlier time? let mut gas_meter = unwrap_or_discard!(self.make_standard_gas_meter(balance, log_context)); @@ -1719,8 +1719,7 @@ impl AptosVM { G: AptosGasMeter, F: FnOnce(u64, VMGasParameters, StorageGasParameters, Gas) -> Result, { - // TODO(Gas): avoid creating txn metadata twice. - let balance = TransactionMetadata::new(txn).max_gas_amount(); + let balance = txn.max_gas_amount().into(); let mut gas_meter = make_gas_meter( self.gas_feature_version, get_or_vm_startup_failure(&self.gas_params, log_context)?