From 55c01f138dd9309bbba6039baefdcab5bc6d7088 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 25 Apr 2018 01:14:19 +0300 Subject: [PATCH] Audo addtoblockindex --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3d1b289bf..cdafada5e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4015,7 +4015,8 @@ bool AcceptBlockHeader(int32_t *futureblockp,const CBlockHeader& block, CValidat if (miSelf != mapBlockIndex.end()) { // Block header is already known. - pindex = miSelf->second; + if ( (pindex= miSelf->second) == 0 ) + pindex = AddToBlockIndex(block); if (ppindex) *ppindex = pindex; if ( pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK ) @@ -4026,6 +4027,7 @@ bool AcceptBlockHeader(int32_t *futureblockp,const CBlockHeader& block, CValidat memset(&komodo_requestedhash,0,sizeof(komodo_requestedhash)); komodo_requestedcount = 0; }*/ + //if ( pindex == 0 ) // fprintf(stderr,"accepthdr %s already known but no pindex\n",hash.ToString().c_str()); return true;