From b2bdbce941256a8ffc52af09023bb75b4372276d Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 27 Oct 2024 15:29:49 -0300 Subject: clean --- shared/librelational_engine/library.cpp | 20 -------------------- shared/librelational_engine/library.h | 1 - 2 files changed, 21 deletions(-) (limited to 'shared') 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& 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 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 target; - tree.serialise(target); - write_tree(tree_path, target); - } else { - merkle::Tree::Hash hash(computed_hash); - merkle::Tree tree; - tree.insert(hash); - std::vector 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++){ diff --git a/shared/librelational_engine/library.h b/shared/librelational_engine/library.h index 16734be..ebf8497 100644 --- a/shared/librelational_engine/library.h +++ b/shared/librelational_engine/library.h @@ -5,6 +5,5 @@ extern void merkle_generate_root(char**, const int, char*); extern void compute_hash(char*, const char*); -extern void register_to_merkle(const char*, const char*); #endif //MERKLECPP_STUB_LIBRARY_H -- cgit v1.2.3