aboutsummaryrefslogtreecommitdiffstats
path: root/src/RelationalNT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RelationalNT.cpp')
-rw-r--r--src/RelationalNT.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/RelationalNT.cpp b/src/RelationalNT.cpp
index acf7ecb..b1302ee 100644
--- a/src/RelationalNT.cpp
+++ b/src/RelationalNT.cpp
@@ -6,6 +6,7 @@
#include "IdentityManager.h"
#include "LifecycleManager.h"
#include "Merkle.h"
+#include "NamespaceReferenceManager.h"
#include "ObjectManager.h"
#include "PermissionsManager.h"
#include "SqliteBackend.h"
@@ -51,8 +52,10 @@ int main()
auto store = [&](std::vector<nt::Attribute> attrs) {
auto bytes = nt::TupleCodec::Serialize(attrs);
auto hash = backend.Put(std::move(bytes));
+ auto hash_bin = nt::hex_to_bin(hash);
villager_rel->merkle_root =
- nt::Merkle::Insert(backend, villager_rel->merkle_root, hash);
+ nt::Merkle<nt::Hash32>::Insert(backend, villager_rel->merkle_root,
+ hash_bin, hash_bin);
};
store({ { "name", "Blathers" }, { "profession", "Museum Curator" } });
store({ { "name", "Rover" }, { "profession", "Traveller" } });
@@ -62,8 +65,9 @@ int main()
// --- Open a handle on villager through the full manager pipeline ---
nt::PermissionsManager permissions;
nt::IdentityManager identities;
- nt::LifecycleManager lifecycles;
- nt::HandlerManager handler(objects, permissions, identities, lifecycles);
+ nt::LifecycleManager lifecycles(objects, backend);
+ nt::NamespaceReferenceManager references(objects, backend);
+ nt::HandlerManager handler(objects, permissions, identities, lifecycles, references);
int connection = 1; // dummy connection context
nt::HandlerManager::handle* handle = handler.Open(path, &connection);