From 06ce10a9a7d9bce8c071ce6ed231583a898b8d4b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 24 Apr 2018 19:24:14 +0300 Subject: [PATCH] Test --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 7b746c3d2..c4c3e29db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4012,7 +4012,11 @@ bool AcceptBlockHeader(int32_t *futureblockp,const CBlockHeader& block, CValidat if (ppindex) *ppindex = pindex; if ( pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK ) - return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); + { + if (!CheckBlockHeader(futureblockp,*ppindex!=0?(*ppindex)->nHeight:0,*ppindex, block, state,0)) + return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); + else pindex->nStatus &= ~BLOCK_FAILED_MASK; + } /*if ( pindex != 0 && hash == komodo_requestedhash ) { fprintf(stderr,"AddToBlockIndex A komodo_requestedhash %s\n",komodo_requestedhash.ToString().c_str());