Check block latency after logging.
This commit is contained in:
parent
087d58f5f4
commit
1ce4d36532
1 changed files with 2 additions and 2 deletions
|
|
@ -524,8 +524,6 @@ namespace detail {
|
||||||
std::vector<fc::uint160_t>& contained_transaction_message_ids) override
|
std::vector<fc::uint160_t>& contained_transaction_message_ids) override
|
||||||
{ try {
|
{ 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)
|
if (!sync_mode || blk_msg.block.block_num() % 10000 == 0)
|
||||||
{
|
{
|
||||||
const auto& witness = blk_msg.block.witness(*_chain_db);
|
const auto& witness = blk_msg.block.witness(*_chain_db);
|
||||||
|
|
@ -538,6 +536,8 @@ namespace detail {
|
||||||
("w",witness_account.name)
|
("w",witness_account.name)
|
||||||
("i",last_irr)("d",blk_msg.block.block_num()-last_irr) );
|
("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 {
|
try {
|
||||||
// TODO: in the case where this block is valid but on a fork that's too old for us to switch to,
|
// TODO: in the case where this block is valid but on a fork that's too old for us to switch to,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue