CTxDB txdb("r");
if (!txNew.GetCoinAge(txdb, nCoinAge))
return error("CreateCoinStake : failed to calculate coin age");
- nCredit += GetProofOfStakeReward(nCoinAge);
+ nCredit += GetProofOfStakeReward(nCoinAge, nBits, txNew.nTime);
}
int64 nMinFee = 0;
CWalletDB walletdb(strWalletFile);
walletdb.ErasePool(nIndex);
}
- printf("keypool keep %"PRI64d"\n", nIndex);
+ if(fDebug)
+ printf("keypool keep %"PRI64d"\n", nIndex);
}
void CWallet::ReturnKey(int64 nIndex)
LOCK(cs_wallet);
setKeyPool.insert(nIndex);
}
- printf("keypool return %"PRI64d"\n", nIndex);
+ if(fDebug)
+ printf("keypool return %"PRI64d"\n", nIndex);
}
bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)