return true;
}
-void BitcoinMiner(CWallet *pwallet, bool fProofOfStake)
+void StakeMiner(CWallet *pwallet)
{
SetThreadPriority(THREAD_PRIORITY_LOWEST);
// Make this thread recognisable as the mining thread
- RenameThread("bitcoin-miner");
+ RenameThread("novacoin-miner");
// Each thread has its own counter
unsigned int nExtraNonce = 0;
- while (fProofOfStake)
+ while (true)
{
if (fShutdown)
return;
Sleep(1000);
if (fShutdown)
return;
- if (!fProofOfStake)
- return;
}
while (pwallet->IsLocked())
//
CBlockIndex* pindexPrev = pindexBest;
- auto_ptr<CBlock> pblock(CreateNewBlock(pwallet, fProofOfStake));
+ auto_ptr<CBlock> pblock(CreateNewBlock(pwallet, true));
if (!pblock.get())
return;
IncrementExtraNonce(pblock.get(), pindexPrev, nExtraNonce);
bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock);
uint256 WantedByOrphan(const CBlock* pblockOrphan);
const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, bool fProofOfStake);
-void BitcoinMiner(CWallet *pwallet, bool fProofOfStake);
+void StakeMiner(CWallet *pwallet);
void ResendWalletTransactions();
try
{
vnThreadsRunning[THREAD_MINTER]++;
- BitcoinMiner(pwallet, true);
+ StakeMiner(pwallet);
vnThreadsRunning[THREAD_MINTER]--;
}
catch (std::exception& e) {