Add -stopatheight for benchmarking

This commit is contained in:
Pieter Wuille
2017-04-27 12:25:13 -07:00
parent a550f6e415
commit b297426c96
3 changed files with 8 additions and 0 deletions

View File

@@ -2537,6 +2537,9 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
return false;
}
int nStopAtHeight = GetArg("-stopatheight", DEFAULT_STOPATHEIGHT);
if (nStopAtHeight && pindexNewTip->nHeight >= nStopAtHeight) StartShutdown();
return true;
}