aboutsummaryrefslogtreecommitdiffstats
path: root/test/VM.cpp
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-05-18 12:50:25 -0300
committerGitHub <noreply@github.com>2026-05-18 12:50:25 -0300
commitaf8759a9c1d965a3220024d1857aea219d62d898 (patch)
tree9cf14af855cac3674f508ec001bd04e262a524ae /test/VM.cpp
parent0fc76b99abbff1d3cef8e2f9fcd56f3ae4f23a7a (diff)
downloadRNT-af8759a9c1d965a3220024d1857aea219d62d898.tar.gz
RNT-af8759a9c1d965a3220024d1857aea219d62d898.zip
Branching and object registry rework (#11)
Diffstat (limited to '')
-rw-r--r--test/VM.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/VM.cpp b/test/VM.cpp
index 00361cb..b0a602f 100644
--- a/test/VM.cpp
+++ b/test/VM.cpp
@@ -6,6 +6,7 @@
#include "InMemoryBackend.h"
#include "LifecycleManager.h"
#include "Merkle.h"
+#include "NamespaceReferenceManager.h"
#include "ObjectManager.h"
#include "PermissionsManager.h"
#include "TupleCodec.h"
@@ -32,7 +33,9 @@ static void store_tuple(nt::InMemoryBackend& backend,
if (!entry) return;
auto* rel = dynamic_cast<nt::ObjectManager::Relation*>(entry->object.get());
if (!rel) return;
- rel->merkle_root = nt::Merkle::Insert(backend, rel->merkle_root, hash);
+ auto hash_bin = nt::hex_to_bin(hash);
+ rel->merkle_root = nt::Merkle<nt::Hash32>::Insert(backend, rel->merkle_root,
+ hash_bin, hash_bin);
}
static std::unique_ptr<nt::ObjectManager::object_type> make_relation_type()
@@ -74,9 +77,10 @@ struct Fixture
nt::ObjectManager objects;
nt::PermissionsManager permissions;
nt::IdentityManager identities;
- nt::LifecycleManager lifecycles;
- nt::HandlerManager handler { objects, permissions, identities, lifecycles };
- nt::CursorManager cursors { backend };
+ nt::LifecycleManager lifecycles { objects, backend };
+ nt::NamespaceReferenceManager references { objects, backend };
+ nt::HandlerManager handler { objects, permissions, identities, lifecycles, references };
+ nt::CursorManager cursors { backend, &lifecycles, &objects };
int conn = 1;
};