aboutsummaryrefslogtreecommitdiffstats
path: root/src/InMemoryBackend.cpp
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-07-02 00:31:57 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-07-02 00:31:57 +0000
commitab70e5461b98ddf2b56268c53c171cab89157027 (patch)
tree3e57218edacc8e1366e0d1a86bdb922af7e51dca /src/InMemoryBackend.cpp
parenta4f6637601548a7158869ad155f29db50b151823 (diff)
downloadRNT-ab70e5461b98ddf2b56268c53c171cab89157027.tar.gz
RNT-ab70e5461b98ddf2b56268c53c171cab89157027.zip
Nuke the old code
Diffstat (limited to 'src/InMemoryBackend.cpp')
-rw-r--r--src/InMemoryBackend.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/InMemoryBackend.cpp b/src/InMemoryBackend.cpp
deleted file mode 100644
index 8aebc65..0000000
--- a/src/InMemoryBackend.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "InMemoryBackend.h"
-
-#include <picosha2.h>
-
-namespace nt {
- std::string InMemoryBackend::Put(std::vector<uint8_t> value) {
- const std::string hash = picosha2::hash256_hex_string(value.begin(), value.end());
- kv_.emplace(hash, std::move(value));
- return hash;
- }
-
- std::optional<std::vector<uint8_t>> InMemoryBackend::Get(const std::string& hash) {
- auto it = kv_.find(hash);
- if (it == kv_.end())
- return std::nullopt;
- return it->second;
- }
-} // namespace nt