Check block latency after logging.

This commit is contained in:
Abit 2017-06-04 01:47:02 +02:00 committed by GitHub
parent 087d58f5f4
commit 1ce4d36532

View file

@ -524,8 +524,6 @@ namespace detail {
std::vector<fc::uint160_t>& contained_transaction_message_ids) override
{ try {
auto latency = fc::time_point::now() - blk_msg.block.timestamp;
FC_ASSERT( (latency.count()/1000) > -5000, "Rejecting block with timestamp in the future" );
if (!sync_mode || blk_msg.block.block_num() % 10000 == 0)
{
const auto& witness = blk_msg.block.witness(*_chain_db);
@ -538,6 +536,8 @@ namespace detail {
("w",witness_account.name)
("i",last_irr)("d",blk_msg.block.block_num()-last_irr) );
}
auto latency = fc::time_point::now() - blk_msg.block.timestamp;
FC_ASSERT( (latency.count()/1000) > -5000, "Rejecting block with timestamp in the future" );
try {
// TODO: in the case where this block is valid but on a fork that's too old for us to switch to,