From c01f92c1b7f3c257d71961a8dcdf37318aa3f521 Mon Sep 17 00:00:00 2001 From: dec05eba <0xdec05eba@gmail.com> Date: Thu, 3 May 2018 06:41:50 +0200 Subject: Temporary remove timestamp check --- src/Database.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Database.cpp') 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(); + /* // 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(); 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(); #if 0 -- cgit v1.2.3