From 9f3e2213bfa201b4d478366fc6c17eeac3d40926 Mon Sep 17 00:00:00 2001 From: miketout Date: Sun, 6 May 2018 14:11:55 -0700 Subject: [PATCH 1/2] Wait longer to ensure full chain before starting to mine --- src/miner.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index c698809f5..057cf618c 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -754,6 +754,15 @@ void static BitcoinMiner_noeq() if ( komodo_baseid(ASSETCHAINS_SYMBOL) < 0 ) break; } + + CBlockIndex* curTip; + do { + curTip = chainActive.Tip(); + printf("Verifying block height %d", chainActive.Tip()->nHeight + 1); + sleep(2); + } while (curTip != chainActive.Tip()); + printf("Mining height %d", chainActive.Tip()->nHeight + 1); + miningTimer.start(); try { From c0c38bb43d12591bae0af64b89506c6b0f771a9d Mon Sep 17 00:00:00 2001 From: miketout Date: Sun, 6 May 2018 14:13:20 -0700 Subject: [PATCH 2/2] fix off by one --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 057cf618c..a107931ef 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -758,7 +758,7 @@ void static BitcoinMiner_noeq() CBlockIndex* curTip; do { curTip = chainActive.Tip(); - printf("Verifying block height %d", chainActive.Tip()->nHeight + 1); + printf("Verifying block height %d", chainActive.Tip()->nHeight); sleep(2); } while (curTip != chainActive.Tip()); printf("Mining height %d", chainActive.Tip()->nHeight + 1);