diff options
author | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-03-09 10:26:55 +0100 |
---|---|---|
committer | Aleksi Lindeman <0xdec05eba@gmail.com> | 2018-03-09 10:27:06 +0100 |
commit | 230e61091b401b8b2bb9496d557a15660fb5072b (patch) | |
tree | 13b937d93105c069d6478480c8a9ada45ccc2434 /tests | |
parent | 2ffb47d0043e57707474e5ae811f97c2e5e93f25 (diff) |
Partially implement 'add' operation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
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) |