From 69a0117793352a8fd56b046b11f54d84ad757353 Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 12 Oct 2021 17:00:01 +0300 Subject: [PATCH] rpc: git rid of obsolete PoS timestamps checks --- src/rpc/core_rpc_server.cpp | 22 ---------------------- src/wallet/wallet2.cpp | 9 +-------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index b6634494..c16efcac 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -916,17 +916,6 @@ namespace currency error_resp.message = "Block not accepted"; return false; } - //@#@ - //temporary double check timestamp - if (time(NULL) - static_cast(get_block_datetime(b)) > 5) - { - LOG_PRINT_RED_L0("Found block (" << get_block_hash(b) << ") timestamp (" << get_block_datetime(b) - << ") is suspiciously less (" << time(NULL) - static_cast(get_block_datetime(b)) << ") than current time ( " << time(NULL) << ")"); - //mark node to make it easier to find it via scanner - m_core.get_blockchain_storage().get_performnce_data().epic_failure_happend = true; - } - // - res.status = "OK"; return true; @@ -973,17 +962,6 @@ namespace currency error_resp.message = "Block not accepted"; return false; } - //@#@ - //temporary double check timestamp - if (time(NULL) - static_cast(get_block_datetime(b)) > 5) - { - LOG_PRINT_RED_L0("Found block (" << get_block_hash(b) << ") timestamp (" << get_block_datetime(b) - << ") is suspiciously less (" << time(NULL) - static_cast(get_block_datetime(b)) << ") than current time ( " << time(NULL) << ")"); - //mark node to make it easier to find it via scanner - m_core.get_blockchain_storage().get_performnce_data().epic_failure_happend = true; - } - // - res.status = "OK"; return true; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e74f6634..546ccff1 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3560,14 +3560,7 @@ bool wallet2::build_minted_block(const currency::COMMAND_RPC_SCAN_POS::request& } WLT_LOG_GREEN("POS block generated and accepted, congrats!", LOG_LEVEL_0); m_wcallback->on_pos_block_found(b); - //@#@ - //double check timestamp - if (time(NULL) - static_cast(get_block_datetime(b)) > 5) - { - WLT_LOG_RED("Found block (" << get_block_hash(b) << ") timestamp (" << get_block_datetime(b) - << ") is suspiciously less (" << time(NULL) - static_cast(get_block_datetime(b)) << ") than current time ( " << time(NULL) << ")", LOG_LEVEL_0); - } - // + return true; } //----------------------------------------------------------------------------------------------------