Skip to content

Commit

Permalink
Overly verbose keypool reserve/return traces in log
Browse files Browse the repository at this point in the history
Fix issue bitcoin#557, such debug statement will be printed
only if `debug=db` is set.
  • Loading branch information
sickpig committed Aug 14, 2017
1 parent 5e58845 commit 85f2124
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2654,7 +2654,7 @@ void CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool)
if (!HaveKey(keypool.vchPubKey.GetID()))
throw runtime_error("ReserveKeyFromKeyPool(): unknown key in key pool");
assert(keypool.vchPubKey.IsValid());
LogPrintf("keypool reserve %d\n", nIndex);
LogPrint("db","keypool reserve %d\n", nIndex);
}
}

Expand All @@ -2666,7 +2666,7 @@ void CWallet::KeepKey(int64_t nIndex)
CWalletDB walletdb(strWalletFile);
walletdb.ErasePool(nIndex);
}
LogPrintf("keypool keep %d\n", nIndex);
LogPrint("db","keypool keep %d\n", nIndex);
}

void CWallet::ReturnKey(int64_t nIndex)
Expand All @@ -2676,7 +2676,7 @@ void CWallet::ReturnKey(int64_t nIndex)
LOCK(cs_wallet);
setKeyPool.insert(nIndex);
}
LogPrintf("keypool return %d\n", nIndex);
LogPrint("db","keypool return %d\n", nIndex);
}

bool CWallet::GetKeyFromPool(CPubKey& result)
Expand Down

0 comments on commit 85f2124

Please sign in to comment.