Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Aug 27, 2024
1 parent 7e4fbee commit b0d4372
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions aptos-move/aptos-e2e-comparison-testing/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use aptos_types::{
contract_event::ContractEvent,
on_chain_config::{FeatureFlag, Features, OnChainConfig},
state_store::state_key::{inner::StateKeyInner, StateKey},
transaction::{Transaction, Transaction::UserTransaction, TransactionStatus, Version},
transaction::{Transaction, TransactionStatus, Version},
vm_status::VMStatus,
write_set::{WriteSet, TOTAL_SUPPLY_STATE_KEY},
};
Expand Down Expand Up @@ -400,12 +400,12 @@ impl Execution {
// We use executor only to get access to block executor and avoid some of
// the initializations, but ignore its internal state, i.e., FakeDataStore.
let executor = FakeExecutor::no_genesis();
let mut txns = vec![txn.clone()];
for txn in &mut txns {
if let UserTransaction(_signed_transaction) = txn {
// signed_transaction.set_max_gmount(min(100_000, signed_transaction.max_gas_amount() * 2));
}
}
let txns = vec![txn.clone()];
// for txn in &mut txns {
// if let UserTransaction(_signed_transaction) = txn {
// signed_transaction.set_max_gmount(min(100_000, signed_transaction.max_gas_amount() * 2));
// }
// }
if let Some(debugger) = debugger_opt {
let data_view = DataStateView::new(debugger, version, state);
executor
Expand All @@ -419,12 +419,12 @@ impl Execution {
.execute_transaction_block_with_state_view(txns, &state, false)
.map(|mut res| {
let res_i = res.pop().unwrap();
println!(
"v2 flag:{} gas used:{}, status:{:?}",
v2_flag,
res_i.gas_used(),
res_i.status()
);
// println!(
// "v2 flag:{} gas used:{}, status:{:?}",
// v2_flag,
// res_i.gas_used(),
// res_i.status()
// );
(res_i.clone().into(), res_i.status().clone())
});
res
Expand Down
8 changes: 4 additions & 4 deletions aptos-move/aptos-gas-meter/src/algebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ impl GasAlgebra for StandardGasAlgebra {
self.execution_gas_used += amount;
}
if self.feature_version >= 7 && self.execution_gas_used > self.max_execution_gas {
println!(
"self.execution_gas_used:{}, self.max_execution_gas:{}",
self.execution_gas_used, self.max_execution_gas
);
// println!(
// "self.execution_gas_used:{}, self.max_execution_gas:{}",
// self.execution_gas_used, self.max_execution_gas
// );
Err(PartialVMError::new(StatusCode::EXECUTION_LIMIT_REACHED))
} else {
Ok(())
Expand Down

0 comments on commit b0d4372

Please sign in to comment.