aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-05-17 01:23:05 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-05-17 01:23:09 +0200
commit1fdbbfd98b91cd36374cdac9500bd73e33e54b9b (patch)
treeeaec26f1a6a9ae7a018031fea2cbb8da9ebed271 /src
parentc8f015c546d095857fde0f5fbef95156ce993691 (diff)
Fix bug where addData/addUser doesn't get send to listening peers
Diffstat (limited to 'src')
-rw-r--r--src/Database.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Database.cpp b/src/Database.cpp
index 065f441..68f7b9c 100644
--- a/src/Database.cpp
+++ b/src/Database.cpp
@@ -461,7 +461,7 @@ namespace odhtdb
DataView encryptedDataView((char*)requestData.data + serializer.getBuffer().size(), requestData.size - serializer.getBuffer().size());
databaseStorage.appendStorage(*nodeInfo.getRequestHash(), requestDataHash, DatabaseOperation::ADD_DATA, newActionCounter, userToPerformActionWith.getPublicKey(), timestampCombined, (u8*)stagedAddObject.data, stagedAddObject.size, encryptedDataView);
- DhtKey dhtKey(requestDataHash);
+ DhtKey dhtKey(*nodeInfo.getRequestHash());
Value addDataValue((u8*)stagedAddObject.data, stagedAddObject.size);
node.put(dhtKey.getNewDataListenerKey(), move(addDataValue), [](bool ok)
{
@@ -495,7 +495,7 @@ namespace odhtdb
DataView additionalDataView((void*)(static_cast<const char*>(requestData.data) + additionalDataOffset), requestData.size - additionalDataOffset);
databaseStorage.appendStorage(*nodeInfo.getRequestHash(), requestDataHash, DatabaseOperation::ADD_USER, newActionCounter, userToPerformActionWith.getPublicKey(), timestampCombined, (u8*)stagedAddObject.data, stagedAddObject.size, additionalDataView);
- DhtKey dhtKey(requestDataHash);
+ DhtKey dhtKey(*nodeInfo.getRequestHash());
Value addDataValue((u8*)stagedAddObject.data, stagedAddObject.size);
node.put(dhtKey.getNewDataListenerKey(), move(addDataValue), [](bool ok)
{