aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index 5e53dc8..8818ff9 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -18,19 +18,6 @@ int main()
std::string privateKeyStr = localUser->getPrivateKey().toString();
printf("Local user private key: %s\n", privateKeyStr.c_str());
-
-/*
- char hex_ed_pk[65];
- unsigned char seed[crypto_sign_ed25519_SEEDBYTES];
- unsigned char ed25519_skpk[crypto_sign_ed25519_SECRETKEYBYTES];
- unsigned char ed25519_pk[crypto_sign_ed25519_PUBLICKEYBYTES];
-
- crypto_sign_ed25519_sk_to_seed(seed, ed25519_skpk);
- crypto_sign_ed25519_seed_keypair(ed25519_pk, ed25519_skpk, seed);
- sodium_bin2hex(hex_ed_pk, 65, ed25519_pk, 32);
- printf("public key: %s\n", hex_ed_pk);
- */
-
// TODO: For tests, dont run against bootstrap.ring.cx.
// Run against a bootstrap node made only for testing which doesn't persist added data.
@@ -42,8 +29,8 @@ int main()
group.addUser(localUser);
database.create("galax.channel.latenight.chat", &group);
- //const char *data = "hello, world!";
- //database.add("galax.channel.latenight.chat", DataView{ (void*)data, strlen(data) });
+ const char *data = "hello, world!";
+ database.add("galax.channel.latenight.chat", DataView{ (void*)data, strlen(data) }, localUser);
database.commit();
auto start = chrono::high_resolution_clock::now();
while(chrono::high_resolution_clock::now() - start < 5s)