X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fminer.cpp;h=386155b16f1400876817126b95437b7941744472;hb=65da4c5bc57ef7c9fd86994bd08208e48a6165ab;hp=0038474faf9dca76a4f8ac7527b5af27f2f7c6e2;hpb=a2d67b52d688d3044927a3b534d0450b6559f5cd;p=novacoin.git diff --git a/src/miner.cpp b/src/miner.cpp index 0038474..386155b 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -15,9 +15,6 @@ using namespace std; // BitcoinMiner // -string strMintMessage = "Stake miner suspended due to locked wallet."; -string strMintWarning; - extern unsigned int nMinerSleep; int static FormatHashBlocks(void* pbuffer, unsigned int len) @@ -355,7 +352,10 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake) printf("CreateNewBlock(): total size %"PRI64u"\n", nBlockSize); if (!fProofOfStake) - pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits); + { + bool fProtocol048 = fTestNet || VALIDATION_SWITCH_TIME < pblock->nTime; + pblock->vtx[0].vout[0].nValue = GetProofOfWorkReward(pblock->nBits, fProtocol048 ? nFees : 0); + } // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash(); @@ -528,7 +528,6 @@ void StakeMiner(CWallet *pwallet) while (pwallet->IsLocked()) { - strMintWarning = strMintMessage; Sleep(1000); if (fShutdown) return; @@ -541,8 +540,6 @@ void StakeMiner(CWallet *pwallet) return; } - strMintWarning = ""; - // // Create new block // @@ -556,7 +553,6 @@ void StakeMiner(CWallet *pwallet) // Trying to sign a block if (pblock->SignBlock(*pwallet)) { - strMintWarning = _("Stake generation: new block found!"); SetThreadPriority(THREAD_PRIORITY_NORMAL); CheckStake(pblock.get(), *pwallet); SetThreadPriority(THREAD_PRIORITY_LOWEST);