Fix latency check error

This commit is contained in:
Abit 2017-06-05 00:32:44 +02:00 committed by GitHub
parent 1ce4d36532
commit df787c9062

View file

@ -524,6 +524,7 @@ namespace detail {
std::vector<fc::uint160_t>& contained_transaction_message_ids) override
{ try {
auto latency = fc::time_point::now() - blk_msg.block.timestamp;
if (!sync_mode || blk_msg.block.block_num() % 10000 == 0)
{
const auto& witness = blk_msg.block.witness(*_chain_db);
@ -536,7 +537,6 @@ 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 {