if (!pblock.get())
return NULL;
+ pblock->nBits = GetNextWorkRequired(pindexPrev);
+
// Create coinbase tx
CTransaction txNew;
txNew.vin.resize(1);
// ppcoin: if coinstake available add coinstake tx
CTransaction txCoinStake;
- if (pwallet->CreateCoinStake(txNew.vout[0].scriptPubKey, txCoinStake))
+ if (pwallet->CreateCoinStake(txNew.vout[0].scriptPubKey, pblock->nBits, txCoinStake))
pblock->vtx.push_back(txCoinStake);
// Collect memory pool transactions into the block
}
}
}
- pblock->nBits = GetNextWorkRequired(pindexPrev);
pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits);
// Fill in header