From d3e71794c49f9d7197a511924fd350015cedae6d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 1 Jan 2018 09:27:06 +0000 Subject: [PATCH] do it before, and return false instead of going into a loop, so cli will work --- src/main.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b9aecf769..d84fbb33c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2051,9 +2051,13 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin const CChainParams& chainparams = Params(); AssertLockHeld(cs_main); - int64_t FORK_HEIGHT = 235555; - // now = 232143 + int64_t FORK_HEIGHT = 232173; + // hit the pause button + if(pindex->nHeight > FORK_HEIGHT) { + printf("Past fork height, sleepytime!\n"); + return false; + } bool fExpensiveChecks = true; if (fCheckpointsEnabled) { CBlockIndex *pindexLastCheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints()); @@ -2063,13 +2067,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin } } - // hit the pause button - if(pindex->nHeight == FORK_HEIGHT) { - while(1) { - sleep(1); - } - } - auto verifier = libzcash::ProofVerifier::Strict(); auto disabledVerifier = libzcash::ProofVerifier::Disabled();