diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2024-10-27 15:29:49 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2024-11-02 20:07:39 -0300 |
| commit | b2bdbce941256a8ffc52af09023bb75b4372276d (patch) | |
| tree | aded4defc21a1e0b601d27a8d30ab7b56320b356 /shared/librelational_engine/library.cpp | |
| parent | b5dbdaa989a86477669aac0bf342029e1d2b6028 (diff) | |
| download | Sakura-b2bdbce941256a8ffc52af09023bb75b4372276d.tar.gz Sakura-b2bdbce941256a8ffc52af09023bb75b4372276d.zip | |
clean
Diffstat (limited to 'shared/librelational_engine/library.cpp')
| -rw-r--r-- | shared/librelational_engine/library.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/shared/librelational_engine/library.cpp b/shared/librelational_engine/library.cpp index cab8f93..0ef8038 100644 --- a/shared/librelational_engine/library.cpp +++ b/shared/librelational_engine/library.cpp @@ -27,26 +27,6 @@ void write_tree(const char* tree_path, const std::vector<uint8_t>& serialized_tr extern "C" { #include "library.h" - extern void register_to_merkle(const char* tree_path, const char* computed_hash) { - struct stat st; - if (stat(tree_path, &st) == 0) { - const std::vector<uint8_t> tree_bytes = read_tree(tree_path); - merkle::Tree tree; - tree.deserialise(tree_bytes); - const merkle::Tree::Hash hash(computed_hash); - tree.insert(hash); - std::vector<uint8_t> target; - tree.serialise(target); - write_tree(tree_path, target); - } else { - merkle::Tree::Hash hash(computed_hash); - merkle::Tree tree; - tree.insert(hash); - std::vector<uint8_t> target; - tree.serialise(target); - write_tree(tree_path, target); - } - } extern void merkle_generate_root(char** hashes, const int n, char* root) { merkle::Tree tree; for (int i = 0; i < n; i++){ |
