1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix incorrect gas consumption with verbosity > 3 (#1077)

This commit is contained in:
Marat 2024-07-26 14:08:52 +02:00 committed by GitHub
parent 1b9372804f
commit a5521a60aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -441,10 +441,16 @@ int VmState::step() {
if (log.log_mask & vm::VmLog::DumpStackVerbose) {
mode += 4;
}
std::unique_ptr<VmStateInterface> tmp_ctx;
// install temporary dummy vm state interface to prevent charging for cell load operations during dump
VmStateInterface::Guard guard(tmp_ctx.get());
stack->dump(ss, mode);
VM_LOG(this) << "stack:" << ss.str();
}
if (stack_trace) {
std::unique_ptr<VmStateInterface> tmp_ctx;
// install temporary dummy vm state interface to prevent charging for cell load operations during dump
VmStateInterface::Guard guard(tmp_ctx.get());
stack->dump(std::cerr, 3);
}
++steps;