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

emergency update

This commit is contained in:
ton 2020-03-24 03:32:16 +04:00
parent 5d846e0aaf
commit 9f351fc29f
87 changed files with 2486 additions and 655 deletions

View file

@ -32,7 +32,11 @@ TEST(KeyValue, simple) {
td::RocksDb::destroy(db_name).ignore();
std::unique_ptr<td::KeyValue> kv = std::make_unique<td::RocksDb>(td::RocksDb::open(db_name.str()).move_as_ok());
auto set_value = [&](td::Slice key, td::Slice value) { kv->set(key, value); };
auto set_value = [&](td::Slice key, td::Slice value) {
kv->begin_transaction();
kv->set(key, value);
kv->commit_transaction();
};
auto ensure_value = [&](td::Slice key, td::Slice value) {
std::string kv_value;
auto status = kv->get(key, kv_value).move_as_ok();