diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-05-03 06:41:50 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-05-03 06:41:54 +0200 |
commit | c01f92c1b7f3c257d71961a8dcdf37318aa3f521 (patch) | |
tree | 464783f42e11bf28f4244cbd78318a05f3199f2b /src/Database.cpp | |
parent | df4c9798e514eaaf7d8387110eb06a2187e43eea (diff) |
Temporary remove timestamp check
Diffstat (limited to 'src/Database.cpp')
-rw-r--r-- | src/Database.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Database.cpp b/src/Database.cpp index 85e56d3..ee18b87 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -350,6 +350,8 @@ namespace odhtdb throw PermissionDeniedException(errMsg); } + //u64 actionCounter = databaseStorage.increaseUserActionCounter(userToPerformActionWith->getPublicKey()); + sibs::SafeSerializer serializer; serializer.add(DATABASE_ADD_PACKET_STRUCTURE_VERSION); u64 timestampCombined = getSyncedTimestampUtc().getCombined(); @@ -521,6 +523,7 @@ namespace odhtdb } u64 creationDate = deserializer.extract<u64>(); + /* // TODO: This doesn't seem to work right now, fix it auto currentTimestamp = getSyncedTimestampUtc(); if(creationDate > currentTimestamp.getCombined()) { @@ -531,6 +534,7 @@ namespace odhtdb errMsg += to_string((double)currentTimestamp.seconds + currentTimestamp.getFractionAsSeconds()); throw sibs::DeserializeException(errMsg); } + */ char creatorPublicKeyRaw[PUBLIC_KEY_NUM_BYTES]; deserializer.extract((u8*)creatorPublicKeyRaw, PUBLIC_KEY_NUM_BYTES); @@ -571,6 +575,7 @@ namespace odhtdb u64 creationDate = deserializerUnsigned.extract<u64>(); auto currentTimestamp = getSyncedTimestampUtc(); + /* // TODO: This doesn't seem to work right now, fix it if(creationDate > currentTimestamp.getCombined()) { auto creationDateTimestamp = ntp::NtpTimestamp::fromCombined(creationDate); @@ -580,6 +585,7 @@ namespace odhtdb errMsg += to_string((double)currentTimestamp.seconds + currentTimestamp.getFractionAsSeconds()); throw sibs::DeserializeException(errMsg); } + */ DatabaseOperation operation = deserializerUnsigned.extract<DatabaseOperation>(); #if 0 |