This commit is contained in:
jl777
2016-12-01 10:43:35 -03:00
parent 8985164dec
commit 763747109f

View File

@@ -2555,6 +2555,7 @@ static int64_t nTimePostConnect = 0;
* corresponding to pindexNew, to bypass loading it again from disk.
*/
bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *pblock) {
assert(pindexNew->pprev == chainActive.Tip());
mempool.check(pcoinsTip);
// Read block from disk.
@@ -2705,12 +2706,14 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
}
if ( 1 )
{
while (chainActive.Tip()->nHeight > 91419 )
while (chainActive.Tip()->nHeight > 91418 )
{
fprintf(stderr,"rewind ht.%d\n",chainActive.Tip()->nHeight);
if (!DisconnectTip(state))
if ( !DisconnectTip(state) )
return false;
}
pindexOldTip = chainActive.Tip();
pindexFork = chainActive.FindFork(pindexMostWork);
}
// Build list of new blocks to connect.
std::vector<CBlockIndex*> vpindexToConnect;