diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-18 12:50:25 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-18 12:50:25 -0300 |
| commit | af8759a9c1d965a3220024d1857aea219d62d898 (patch) | |
| tree | 9cf14af855cac3674f508ec001bd04e262a524ae /src/RelationalNT.cpp | |
| parent | 0fc76b99abbff1d3cef8e2f9fcd56f3ae4f23a7a (diff) | |
| download | RNT-af8759a9c1d965a3220024d1857aea219d62d898.tar.gz RNT-af8759a9c1d965a3220024d1857aea219d62d898.zip | |
Branching and object registry rework (#11)
Diffstat (limited to '')
| -rw-r--r-- | src/RelationalNT.cpp | 10 |
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); |
