mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
celldb in-memory mode (--celldb-in-memory option)
This commit is contained in:
parent
420029b056
commit
1723562748
48 changed files with 1966 additions and 201 deletions
|
@ -142,6 +142,20 @@ class TonDbTransactionImpl {
|
|||
friend bool operator<(td::Slice hash, const SmartContractInfo &info) {
|
||||
return hash < info.hash;
|
||||
}
|
||||
|
||||
struct Eq {
|
||||
using is_transparent = void; // Pred to use
|
||||
bool operator()(const SmartContractInfo &info, const SmartContractInfo &other_info) const { return info.hash == other_info.hash;}
|
||||
bool operator()(const SmartContractInfo &info, td::Slice hash) const { return info.hash == hash;}
|
||||
bool operator()(td::Slice hash, const SmartContractInfo &info) const { return info.hash == hash;}
|
||||
|
||||
};
|
||||
struct Hash {
|
||||
using is_transparent = void; // Pred to use
|
||||
using transparent_key_equal = Eq;
|
||||
size_t operator()(td::Slice hash) const { return cell_hash_slice_hash(hash); }
|
||||
size_t operator()(const SmartContractInfo &info) const { return cell_hash_slice_hash(info.hash);}
|
||||
};
|
||||
};
|
||||
|
||||
CellHashTable<SmartContractInfo> contracts_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue