From 230e61091b401b8b2bb9496d557a15660fb5072b Mon Sep 17 00:00:00 2001 From: Aleksi Lindeman <0xdec05eba@gmail.com> Date: Fri, 9 Mar 2018 10:26:55 +0100 Subject: Partially implement 'add' operation --- tests/main.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/main.cpp b/tests/main.cpp index 3c7e798..0218c8c 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -90,18 +90,11 @@ int main() // TODO: Setup local bootstrap node for tests Database database("bootstrap.ring.cx", 4222, "storage"); - auto databaseCreateResponse = database.create(localUser, "latenight"); - - /* + auto databaseCreateResponse = database.create("dec05eba", "latenight"); const char *data = "hello, world!"; - database.add(localUser, "galax.channel.latenight.chat", DataView{ (void*)data, strlen(data) }); + database.add(databaseCreateResponse, DataView{ (void*)data, strlen(data) }); database.commit(); - auto start = chrono::high_resolution_clock::now(); - while(chrono::high_resolution_clock::now() - start < 3s) - { - this_thread::sleep_for(10ms); - } - */ + database.seed(databaseCreateResponse->getRequestHash(), databaseCreateResponse->getNodeEncryptionKey()); auto start = chrono::high_resolution_clock::now(); while(chrono::high_resolution_clock::now() - start < 3s) -- cgit v1.2.3