diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
| commit | ab70e5461b98ddf2b56268c53c171cab89157027 (patch) | |
| tree | 3e57218edacc8e1366e0d1a86bdb922af7e51dca /src/InMemoryBackend.cpp | |
| parent | a4f6637601548a7158869ad155f29db50b151823 (diff) | |
| download | RNT-ab70e5461b98ddf2b56268c53c171cab89157027.tar.gz RNT-ab70e5461b98ddf2b56268c53c171cab89157027.zip | |
Nuke the old code
Diffstat (limited to '')
| -rw-r--r-- | src/InMemoryBackend.cpp | 18 |
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 |
