mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix infinity max_gas_limit for get methods
This commit is contained in:
parent
703bcd6e32
commit
1b480e39ba
2 changed files with 2 additions and 2 deletions
|
@ -207,7 +207,7 @@ SmartContract::Answer SmartContract::run_get_method(Args args) const {
|
||||||
args.c7 = prepare_vm_c7(now, args.balance);
|
args.c7 = prepare_vm_c7(now, args.balance);
|
||||||
}
|
}
|
||||||
if (!args.limits) {
|
if (!args.limits) {
|
||||||
args.limits = vm::GasLimits{1000000};
|
args.limits = vm::GasLimits{1000000, 1000000};
|
||||||
}
|
}
|
||||||
if (!args.stack) {
|
if (!args.stack) {
|
||||||
args.stack = td::Ref<vm::Stack>(true);
|
args.stack = td::Ref<vm::Stack>(true);
|
||||||
|
|
|
@ -1150,7 +1150,7 @@ void LiteQuery::finish_runSmcMethod(td::BufferSlice shard_proof, td::BufferSlice
|
||||||
long long gas_limit = client_method_gas_limit;
|
long long gas_limit = client_method_gas_limit;
|
||||||
LOG(DEBUG) << "creating VM with gas limit " << gas_limit;
|
LOG(DEBUG) << "creating VM with gas limit " << gas_limit;
|
||||||
// **** INIT VM ****
|
// **** INIT VM ****
|
||||||
vm::GasLimits gas{gas_limit};
|
vm::GasLimits gas{gas_limit, gas_limit};
|
||||||
vm::VmState vm{std::move(code), std::move(stack_), gas, 1, std::move(data), vm::VmLog::Null()};
|
vm::VmState vm{std::move(code), std::move(stack_), gas, 1, std::move(data), vm::VmLog::Null()};
|
||||||
auto c7 = prepare_vm_c7(gen_utime, gen_lt, td::make_ref<vm::CellSlice>(acc.addr->clone()), balance);
|
auto c7 = prepare_vm_c7(gen_utime, gen_lt, td::make_ref<vm::CellSlice>(acc.addr->clone()), balance);
|
||||||
vm.set_c7(c7); // tuple with SmartContractInfo
|
vm.set_c7(c7); // tuple with SmartContractInfo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue