mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-12 11:12:16 +00:00
Improve gas consumption in VmState::jump_to (#1276)
This commit is contained in:
parent
3e806bf46e
commit
5920f800de
1 changed files with 4 additions and 4 deletions
|
@ -373,11 +373,11 @@ class VmState final : public VmStateInterface {
|
|||
int jump_to(Ref<Continuation> cont) {
|
||||
int res = 0, cnt = 0;
|
||||
while (cont.not_null()) {
|
||||
cnt++;
|
||||
cont = cont->is_unique() ? cont.unique_write().jump_w(this, res) : cont->jump(this, res);
|
||||
}
|
||||
if (global_version >= 9 && cnt > free_nested_cont_jump) {
|
||||
consume_gas(cnt - free_nested_cont_jump);
|
||||
cnt++;
|
||||
if (cnt > free_nested_cont_jump && global_version >= 9) {
|
||||
consume_gas(1);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue