diff --git a/src/miner.cpp b/src/miner.cpp index 386cb2fe1..691e22d70 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -540,6 +540,7 @@ void static BitcoinMiner(CWallet *pwallet) // unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated(); CBlockIndex* pindexPrev = chainActive.Tip(); + if(!pindexPrev) break; auto_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); if (!pblocktemplate.get()) @@ -547,6 +548,7 @@ void static BitcoinMiner(CWallet *pwallet) CBlock *pblock = &pblocktemplate->block; IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); + LogPrintf("Running DarkcoinMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(), ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));