From 17522a555707c378c692a4644b047cd19fddeaad Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 20 Apr 2018 11:19:35 +0300 Subject: [PATCH] Test --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index dc4e29942..3afdc77b9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4129,6 +4129,18 @@ bool ProcessNewBlock(bool from_miner,int32_t height,CValidationState &state, CNo // Store to disk CBlockIndex *pindex = NULL; + if ( ASSETCHAINS_STAKED != 0 ) + { + BlockMap::iterator miSelf = mapBlockIndex.find(hash); + if ( miSelf != mapBlockIndex.end() ) + { + if ( (pindex= miSelf->second) == 0 ) + { + fprint(stderr,"Block header is already known, but without pindex\n",hash.ToString().c_str()); + AddToBlockIndex(block); + } + } + } bool ret = AcceptBlock(*pblock, state, &pindex, fRequested, dbp); if (pindex && pfrom) { mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();