mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add methods to sign and import certificates
This commit is contained in:
parent
3384d204d2
commit
cb31a20206
20 changed files with 682 additions and 18 deletions
|
@ -46,6 +46,17 @@ class DecTree {
|
|||
}
|
||||
}
|
||||
|
||||
template <typename FuncT>
|
||||
void iterate(const FuncT &cb) {
|
||||
if (left_) {
|
||||
left_->iterate(cb);
|
||||
}
|
||||
cb(key_, value_);
|
||||
if (right_) {
|
||||
right_->iterate(cb);
|
||||
}
|
||||
}
|
||||
|
||||
Node(KeyType key, ValueType value, uint32 y) : size_(1), key_(std::move(key)), value_(std::move(value)), y_(y) {
|
||||
}
|
||||
};
|
||||
|
@ -223,6 +234,15 @@ class DecTree {
|
|||
bool exists(const KeyType &key) const {
|
||||
return get_node(root_, key) != nullptr;
|
||||
}
|
||||
|
||||
template <typename FuncT>
|
||||
void iterate(const FuncT &cb) {
|
||||
if (size() == 0) {
|
||||
return;
|
||||
} else {
|
||||
root_->iterate(cb);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue