diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-03-09 10:26:55 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 0e62cb8e5ed06d906ad84321cdda22acfcc952c9 (patch) | |
tree | 9ba0cc8e20febb4bf07d4d065e3d653ed651bdda /tests | |
parent | eda9a7bbefc5587bf1ff895a9214f450e64575fa (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) |