1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

updated tonlib, fixed bugs

updated tonlib
fixed bugs in func
validator: partial support for hardforks
liteserver: support for waitMasterchainBlock prefix
transactions: support for gas flat rate
This commit is contained in:
ton 2019-10-03 17:04:52 +04:00
parent 841d5ebac2
commit 7ea00ebfcf
89 changed files with 1922 additions and 608 deletions

View file

@ -42,6 +42,22 @@ class KeyValueDir : public KeyValue {
return td::unlink(key.str());
}
void foreach_key(std::function<void(td::Slice)> f) override {
int cnt = 0;
td::WalkPath::run(directory_, [&](td::Slice path, td::WalkPath::Type type) {
cnt++;
if (type == td::WalkPath::Type::EnterDir) {
if (cnt != 1) {
return td::WalkPath::Action::SkipDir;
}
} else if (type == td::WalkPath::Type::NotDir) {
f(path);
}
return td::WalkPath::Action::Continue;
}).ignore();
}
private:
std::string directory_;
@ -82,6 +98,11 @@ class KeyValueInmemory : public KeyValue {
map_.erase(it);
return td::Status::OK();
}
void foreach_key(std::function<void(td::Slice)> f) override {
for (auto &it : map_) {
f(it.first);
}
}
private:
class Cmp : public std::less<> {