From af8759a9c1d965a3220024d1857aea219d62d898 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Mon, 18 May 2026 12:50:25 -0300 Subject: Branching and object registry rework (#11) --- src/RelationalNT.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/RelationalNT.cpp') 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 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::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); -- cgit v1.2.3