aboutsummaryrefslogtreecommitdiffstats
path: root/test/VM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/VM.cpp')
-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;
};