1
0
Fork 0
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:
OmicronTau 2021-11-30 15:11:14 +03:00 committed by EmelyanenkoK
parent 3384d204d2
commit cb31a20206
20 changed files with 682 additions and 18 deletions

View file

@ -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