mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Use HashSet/HashMap in storage stat (#1540)
This commit is contained in:
parent
b3b2bd1c3c
commit
44e7e091b2
1 changed files with 4 additions and 4 deletions
|
@ -101,9 +101,9 @@ class NewCellStorageStat {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const CellUsageTree* usage_tree_;
|
const CellUsageTree* usage_tree_;
|
||||||
std::set<vm::Cell::Hash> seen_;
|
td::HashSet<vm::Cell::Hash> seen_;
|
||||||
Stat stat_;
|
Stat stat_;
|
||||||
std::set<vm::Cell::Hash> proof_seen_;
|
td::HashSet<vm::Cell::Hash> proof_seen_;
|
||||||
Stat proof_stat_;
|
Stat proof_stat_;
|
||||||
const NewCellStorageStat* parent_{nullptr};
|
const NewCellStorageStat* parent_{nullptr};
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ struct CellStorageStat {
|
||||||
struct CellInfo {
|
struct CellInfo {
|
||||||
td::uint32 max_merkle_depth = 0;
|
td::uint32 max_merkle_depth = 0;
|
||||||
};
|
};
|
||||||
std::map<vm::Cell::Hash, CellInfo> seen;
|
td::HashMap<vm::Cell::Hash, CellInfo> seen;
|
||||||
CellStorageStat() : cells(0), bits(0), public_cells(0) {
|
CellStorageStat() : cells(0), bits(0), public_cells(0) {
|
||||||
}
|
}
|
||||||
explicit CellStorageStat(unsigned long long limit_cells)
|
explicit CellStorageStat(unsigned long long limit_cells)
|
||||||
|
@ -173,7 +173,7 @@ class ProofStorageStat {
|
||||||
enum CellStatus {
|
enum CellStatus {
|
||||||
c_none = 0, c_prunned = 1, c_loaded = 2
|
c_none = 0, c_prunned = 1, c_loaded = 2
|
||||||
};
|
};
|
||||||
std::map<vm::Cell::Hash, CellStatus> cells_;
|
td::HashMap<vm::Cell::Hash, CellStatus> cells_;
|
||||||
td::uint64 proof_size_ = 0;
|
td::uint64 proof_size_ = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue