aboutsummaryrefslogtreecommitdiffstats
path: root/shared/librelational_engine
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2024-10-27 15:29:49 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2024-11-02 20:07:39 -0300
commitb2bdbce941256a8ffc52af09023bb75b4372276d (patch)
treeaded4defc21a1e0b601d27a8d30ab7b56320b356 /shared/librelational_engine
parentb5dbdaa989a86477669aac0bf342029e1d2b6028 (diff)
downloadSakura-b2bdbce941256a8ffc52af09023bb75b4372276d.tar.gz
Sakura-b2bdbce941256a8ffc52af09023bb75b4372276d.zip
clean
Diffstat (limited to '')
-rw-r--r--shared/librelational_engine/library.cpp20
-rw-r--r--shared/librelational_engine/library.h1
2 files changed, 0 insertions, 21 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++){
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