aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-08-23 12:54:50 -0700
committerGregory Maxwell <greg@xiph.org>2013-08-23 12:54:50 -0700
commit71ac5052d83fcba21a09e5e2b7ad66faea6bd42a (patch)
tree45c6cf793ee33237699ed83d8cd12d8fdefb4a6f /src/wallet.cpp
parent20469d83dd2fd7d8efacf94f017b926be7c92e63 (diff)
downloadbitcoin-71ac5052d83fcba21a09e5e2b7ad66faea6bd42a.tar.xz
Remove fAllowReuse from GetKeyFromPool.
With the GUI password fix this was always false.
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index ddfd71efda..7a3855c025 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -493,7 +493,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
if (txout.scriptPubKey == scriptDefaultKey)
{
CPubKey newDefaultKey;
- if (GetKeyFromPool(newDefaultKey, false))
+ if (GetKeyFromPool(newDefaultKey))
{
SetDefaultKey(newDefaultKey);
SetAddressBook(vchDefaultKey.GetID(), "", "receive");
@@ -1647,7 +1647,7 @@ void CWallet::ReturnKey(int64 nIndex)
printf("keypool return %"PRI64d"\n", nIndex);
}
-bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)
+bool CWallet::GetKeyFromPool(CPubKey& result)
{
int64 nIndex = 0;
CKeyPool keypool;
@@ -1656,11 +1656,6 @@ bool CWallet::GetKeyFromPool(CPubKey& result, bool fAllowReuse)
ReserveKeyFromKeyPool(nIndex, keypool);
if (nIndex == -1)
{
- if (fAllowReuse && vchDefaultKey.IsValid())
- {
- result = vchDefaultKey;
- return true;
- }
if (IsLocked()) return false;
result = GenerateNewKey();
return true;