mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Make asynchronous celldb interface (#388)
* Asynchronous load_cell in celldb Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
ca00f0ed91
commit
845cbca1e5
5 changed files with 159 additions and 10 deletions
|
@ -64,6 +64,13 @@ class CellHashTable {
|
|||
size_t size() const {
|
||||
return set_.size();
|
||||
}
|
||||
InfoT* get_if_exists(td::Slice hash) {
|
||||
auto it = set_.find(hash);
|
||||
if (it != set_.end()) {
|
||||
return &const_cast<InfoT &>(*it);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
std::set<InfoT, std::less<>> set_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue