mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Disallow recursive library cells (#868)
* Disallow recursive library cells * Stop emulation of external messages on accept --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
128a85bee5
commit
42d4c051ef
7 changed files with 50 additions and 0 deletions
|
@ -98,6 +98,7 @@ class VmState final : public VmStateInterface {
|
|||
td::HashSet<CellHash> loaded_cells;
|
||||
int stack_trace{0}, debug_off{0};
|
||||
bool chksig_always_succeed{false};
|
||||
bool stop_on_accept_message{false};
|
||||
td::optional<td::Bits256> missing_library;
|
||||
td::uint16 max_data_depth = 512; // Default value
|
||||
int global_version{0};
|
||||
|
@ -381,6 +382,12 @@ class VmState final : public VmStateInterface {
|
|||
bool get_chksig_always_succeed() const {
|
||||
return chksig_always_succeed;
|
||||
}
|
||||
void set_stop_on_accept_message(bool flag) {
|
||||
stop_on_accept_message = flag;
|
||||
}
|
||||
bool get_stop_on_accept_message() const {
|
||||
return stop_on_accept_message;
|
||||
}
|
||||
Ref<OrdCont> ref_to_cont(Ref<Cell> cell) const {
|
||||
return td::make_ref<OrdCont>(load_cell_slice_ref(std::move(cell)), get_cp());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue