Permalink
Browse files

change for staking

  • Loading branch information...
DogeCash
DogeCash committed Oct 5, 2018
1 parent 4997b7a commit 407c758d02630f7e8e73e18e3b30958ab9e81838
Showing with 5 additions and 5 deletions.
  1. +2 −2 src/miner.cpp
  2. +3 −3 src/wallet.cpp
@@ -571,7 +571,7 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
if (!pindexPrev)
continue;

LogPrintf("Miner: Create new block!\n");
// LogPrintf("Miner: Create new block!\n");
unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey, pwallet, fProofOfStake));
if (!pblocktemplate.get())
continue;
@@ -580,7 +580,7 @@ void BitcoinMiner(CWallet* pwallet, bool fProofOfStake)
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);

//Stake miner main
if (fProofOfStake && pwallet->GetBalance() >= Params().getMinstakeReserve() * COIN) {
if (fProofOfStake) {
LogPrintf("CPUMiner : proof-of-stake block found %s \n", pblock->GetHash().ToString().c_str());

if (!pblock->SignBlock(*pwallet)) {
@@ -2536,9 +2536,9 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int

if (mapArgs.count("-reservebalance") && !ParseMoney(mapArgs["-reservebalance"], nReserveBalance))
return error("CreateCoinStake : invalid reserve balance amount");

if (nBalance <= nReserveBalance || nBalance < 10000 * COIN)
return false;
// LogPrintf()
// if (nBalance <= nReserveBalance || nBalance < Params().getMinstakeReserve() * COIN)
// return false;

// presstab HyperStake - Initialize as static and don't update the set on every run of CreateCoinStake() in order to lighten resource use
static std::set<pair<const CWalletTx*, unsigned int> > setStakeCoins;

0 comments on commit 407c758

Please sign in to comment.