From fe90b0fc1a93935dc82c1ff511bdd5a0b9cd57eb Mon Sep 17 00:00:00 2001 From: Scott Nadal Date: Tue, 7 Aug 2012 15:38:02 +0100 Subject: [PATCH] PPCoin: Conditional print keypool reserve and return log message Conditional print create new block log message --- src/main.cpp | 3 ++- src/wallet.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e8b8c61..e01be20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3754,7 +3754,8 @@ CBlock* CreateNewBlock(CWallet* pwallet, bool fProofOfStake) nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; - printf("CreateNewBlock(): total size %lu\n", nBlockSize); + if (fDebug && GetBoolArg("-printpriority")) + printf("CreateNewBlock(): total size %lu\n", nBlockSize); } if (pblock->IsProofOfWork()) diff --git a/src/wallet.cpp b/src/wallet.cpp index bfc57b6..6cc679b 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1593,7 +1593,8 @@ void CWallet::ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool) if (!HaveKey(Hash160(keypool.vchPubKey))) throw runtime_error("ReserveKeyFromKeyPool() : unknown key in key pool"); assert(!keypool.vchPubKey.empty()); - printf("keypool reserve %"PRI64d"\n", nIndex); + if (fDebug && GetBoolArg("-printkeypool")) + printf("keypool reserve %"PRI64d"\n", nIndex); } } @@ -1630,7 +1631,8 @@ void CWallet::ReturnKey(int64 nIndex) LOCK(cs_wallet); setKeyPool.insert(nIndex); } - printf("keypool return %"PRI64d"\n", nIndex); + if (fDebug && GetBoolArg("-printkeypool")) + printf("keypool return %"PRI64d"\n", nIndex); } bool CWallet::GetKeyFromPool(vector& result, bool fAllowReuse) -- 1.7.1