Merge pull request #17 from abitmore/fix-645-block-timestamp

Reject blocks with timestamp too far in the future
This commit is contained in:
Fabian Schuh 2016-08-02 08:56:12 +02:00 committed by GitHub
commit a2fa90bd7d

View file

@ -509,6 +509,7 @@ namespace detail {
{ try {
auto latency = graphene::time::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);