mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
check for null reference
This commit is contained in:
parent
c8fc2633ee
commit
1e8b4cdbf0
@ -540,6 +540,7 @@ void static BitcoinMiner(CWallet *pwallet)
|
||||
//
|
||||
unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
|
||||
CBlockIndex* pindexPrev = chainActive.Tip();
|
||||
if(!pindexPrev) break;
|
||||
|
||||
auto_ptr<CBlockTemplate> 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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user