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

New account storage stat for accelerator

This commit is contained in:
SpyCheese 2025-03-05 17:02:16 +03:00
parent 15da5e846b
commit 928f02e6a1
14 changed files with 514 additions and 127 deletions

View file

@ -112,7 +112,7 @@ void CellUsageTree::set_use_mark_for_is_loaded(bool use_mark) {
}
void CellUsageTree::on_load(NodeId node_id, const td::Ref<vm::DataCell>& cell) {
if (nodes_[node_id].is_loaded) {
if (ignore_loads_ || nodes_[node_id].is_loaded) {
return;
}
nodes_[node_id].is_loaded = true;

View file

@ -66,6 +66,9 @@ class CellUsageTree : public std::enable_shared_from_this<CellUsageTree> {
void set_cell_load_callback(std::function<void(const td::Ref<vm::DataCell>&)> f) {
cell_load_callback_ = std::move(f);
}
void set_ignore_loads(bool value) {
ignore_loads_ = value;
}
private:
struct Node {
@ -80,5 +83,6 @@ class CellUsageTree : public std::enable_shared_from_this<CellUsageTree> {
void on_load(NodeId node_id, const td::Ref<vm::DataCell>& cell);
NodeId create_node(NodeId parent);
bool ignore_loads_ = false;
};
} // namespace vm