Skip to content

Commit

Permalink
change for staking
Browse files Browse the repository at this point in the history
  • Loading branch information
DogeCash committed Oct 5, 2018
1 parent 4997b7a commit 407c758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 407c758

Please sign in to comment.