From 599c2c5f4d216bb57117913d95a07f01c550d2a1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 Apr 2018 16:19:15 +0300 Subject: [PATCH] Allow a block from the future to be rejected without being permabanned --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 45a31f140..c69cb7e6d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3759,11 +3759,11 @@ bool CheckBlockHeader(int32_t *futureblockp,int32_t height,CBlockIndex *pindex, } } *futureblockp = 0; - if (blockhdr.GetBlockTime() > GetAdjustedTime() - 60) // test, usually +60 + if (blockhdr.GetBlockTime() > GetAdjustedTime() + 60) { CBlockIndex *tipindex; fprintf(stderr,"ht.%d future block %u vs time.%u + 60\n",height,(uint32_t)blockhdr.GetBlockTime(),(uint32_t)GetAdjustedTime()); - if ( 0 && (tipindex= chainActive.Tip()) != 0 && tipindex->GetBlockHash() == blockhdr.hashPrevBlock && blockhdr.GetBlockTime() < GetAdjustedTime() + 60*2 ) + if ( (tipindex= chainActive.Tip()) != 0 && tipindex->GetBlockHash() == blockhdr.hashPrevBlock && blockhdr.GetBlockTime() < GetAdjustedTime() + 60 + 5 ) { //fprintf(stderr,"it is the next block, let's wait for %d seconds\n",GetAdjustedTime() + 60 - blockhdr.GetBlockTime()); while ( blockhdr.GetBlockTime() > GetAdjustedTime() + 60 )