aboutsummaryrefslogtreecommitdiff
path: root/src/Database.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-16 22:58:04 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commit8015d182a7b58642cc253956e885c746c49d8d60 (patch)
tree0dbe449797f1bf26470a25678eca4497cc623ac8 /src/Database.cpp
parent90f13e93f4f7d830a77be65998978559f8cc5419 (diff)
Fix node raw data bug (data type mismatch), add debug statements
Diffstat (limited to 'src/Database.cpp')
-rw-r--r--src/Database.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Database.cpp b/src/Database.cpp
index 0fdc438..065f441 100644
--- a/src/Database.cpp
+++ b/src/Database.cpp
@@ -101,7 +101,7 @@ namespace odhtdb
/*.node_config = */{
/*.node_id = */{},
/*.network = */0,
- /*.is_bootstrap = */true,
+ /*.is_bootstrap = */false,
/*.maintain_storage*/false
},
/*.id = */databaseStorage.getIdentity()
@@ -554,10 +554,7 @@ namespace odhtdb
uint8_t adminGroupId[GROUP_ID_LENGTH];
deserializer.extract(adminGroupId, GROUP_ID_LENGTH);
-
- if(deserializer.getSize() < ENCRYPTION_NONCE_BYTE_SIZE)
- throw sibs::DeserializeException("Unsigned encrypted body is too small (unable to extract nonce)");
-
+
databaseStorage.createStorage(hash, userPublicKey, DataView(adminGroupId, GROUP_ID_LENGTH), creationDate, value->data.data(), value->data.size());
}
@@ -605,7 +602,7 @@ namespace odhtdb
bool Database::listenCreateData(shared_ptr<dht::Value> value, const Hash &hash, const shared_ptr<OwnedByteArray> encryptionKey)
{
- Log::debug("Got create data");
+ Log::debug("Got create data in node %s", hash.toString().c_str());
try
{
// This check is here to reduce processing, it doesn't matter much if the packet bypasses this,
@@ -623,7 +620,7 @@ namespace odhtdb
bool Database::listenAddData(shared_ptr<dht::Value> value, const Hash &requestDataHash, const std::shared_ptr<Hash> nodeHash, const shared_ptr<OwnedByteArray> encryptionKey)
{
- Log::debug("Got add data");
+ Log::debug("Got add data in node %s", nodeHash->toString().c_str());
try
{
// This check is here to reduce processing, it doesn't matter much if the packet bypasses this,