doc: Clarify that vpindexToConnect is in reverse order
Also, style-fixups of touched code
This commit is contained in:
1 file changed
+5
-7
+5
-7
@@ -1337,16 +1337,14 @@ static void CheckForkWarningConditions() EXCLUSIVE_LOCKS_REQUIRED(cs_main)
|
|||||||
AssertLockHeld(cs_main);
|
AssertLockHeld(cs_main);
|
||||||
// Before we get past initial download, we cannot reliably alert about forks
|
// Before we get past initial download, we cannot reliably alert about forks
|
||||||
// (we assume we don't get stuck on a fork before finishing our initial sync)
|
// (we assume we don't get stuck on a fork before finishing our initial sync)
|
||||||
if (::ChainstateActive().IsInitialBlockDownload())
|
if (::ChainstateActive().IsInitialBlockDownload()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pindexBestInvalid && pindexBestInvalid->nChainWork > ::ChainActive().Tip()->nChainWork + (GetBlockProof(*::ChainActive().Tip()) * 6))
|
if (pindexBestInvalid && pindexBestInvalid->nChainWork > ::ChainActive().Tip()->nChainWork + (GetBlockProof(*::ChainActive().Tip()) * 6)) {
|
||||||
{
|
|
||||||
LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
|
LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
|
||||||
SetfLargeWorkInvalidChainFound(true);
|
SetfLargeWorkInvalidChainFound(true);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
SetfLargeWorkInvalidChainFound(false);
|
SetfLargeWorkInvalidChainFound(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2710,7 +2708,7 @@ bool CChainState::ActivateBestChainStep(BlockValidationState& state, const CChai
|
|||||||
fBlocksDisconnected = true;
|
fBlocksDisconnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build list of new blocks to connect.
|
// Build list of new blocks to connect (in descending height order).
|
||||||
std::vector<CBlockIndex*> vpindexToConnect;
|
std::vector<CBlockIndex*> vpindexToConnect;
|
||||||
bool fContinue = true;
|
bool fContinue = true;
|
||||||
int nHeight = pindexFork ? pindexFork->nHeight : -1;
|
int nHeight = pindexFork ? pindexFork->nHeight : -1;
|
||||||
|
|||||||
Reference in new issue
Block a user