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

SuspendedAddressList config param (#585)

* SuspendedAddressList config param

* Change tag for cskip_suspended
This commit is contained in:
SpyCheese 2023-01-09 20:37:58 +03:00 committed by GitHub
parent 41ea3ef5b7
commit 13b9f460af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 53 additions and 9 deletions

View file

@ -653,16 +653,20 @@ struct TrComputeInternal1 final : TLB_Complex {
};
struct ComputeSkipReason final : TLB {
enum { cskip_no_state = 0, cskip_bad_state = 1, cskip_no_gas = 2 };
enum { cskip_no_state = 0, cskip_bad_state = 1, cskip_no_gas = 2, cskip_suspended = 3 };
int get_size(const vm::CellSlice& cs) const override {
return 2;
return cs.prefetch_ulong(2) == 3 ? 3 : 2;
}
bool validate_skip(int* ops, vm::CellSlice& cs, bool weak = false) const override {
return get_tag(cs) >= 0 && cs.advance(2);
int tag = get_tag(cs);
return tag >= 0 && cs.advance(tag == 3 ? 3 : 2);
}
int get_tag(const vm::CellSlice& cs) const override {
int t = (int)cs.prefetch_ulong(2);
return t < 3 ? t : -1;
if (t == 3 && cs.prefetch_ulong(3) != 0b110) {
return -1;
}
return t;
}
};