1
0
Fork 0
forked from lthn/blockchain

rpc: git rid of obsolete PoS timestamps checks

This commit is contained in:
sowle 2021-10-12 17:00:01 +03:00
parent 832b7811b9
commit 69a0117793
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
2 changed files with 1 additions and 30 deletions

View file

@ -916,17 +916,6 @@ namespace currency
error_resp.message = "Block not accepted";
return false;
}
//@#@
//temporary double check timestamp
if (time(NULL) - static_cast<int64_t>(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<int64_t>(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<int64_t>(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<int64_t>(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;

View file

@ -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<int64_t>(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<int64_t>(get_block_datetime(b)) << ") than current time ( " << time(NULL) << ")", LOG_LEVEL_0);
}
//
return true;
}
//----------------------------------------------------------------------------------------------------