Move RewindBlockIndex log message inside rewindLength check

This commit is contained in:
Jack Grigg 2018-08-08 12:08:29 +01:00
parent 66856b2b3c
commit 13751895c7
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 1 additions and 1 deletions

View File

@ -4249,10 +4249,10 @@ bool RewindBlockIndex(const CChainParams& params, bool& clearWitnessCaches)
// nHeight is now the height of the first insufficiently-validated block, or tipheight + 1 // nHeight is now the height of the first insufficiently-validated block, or tipheight + 1
auto rewindLength = chainActive.Height() - nHeight; auto rewindLength = chainActive.Height() - nHeight;
LogPrintf("*** First insufficiently validated block at height %d, rewind length %d\n", nHeight, rewindLength);
clearWitnessCaches = false; clearWitnessCaches = false;
if (rewindLength > 0) { if (rewindLength > 0) {
LogPrintf("*** First insufficiently validated block at height %d, rewind length %d\n", nHeight, rewindLength);
const uint256 *phashFirstInsufValidated = chainActive[nHeight]->phashBlock; const uint256 *phashFirstInsufValidated = chainActive[nHeight]->phashBlock;
auto networkID = params.NetworkIDString(); auto networkID = params.NetworkIDString();