aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-12-22 15:51:44 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-12-22 15:57:31 -0500
commit2e17ac83c65b65fe2037b8c8941c25e288905903 (patch)
tree143d73d45bae5e0046ac994a3432f4353d9c0382 /src/wallet.cpp
parentce336fdc21c25c055ffef28fbe7c61164df7ca24 (diff)
downloadbitcoin-2e17ac83c65b65fe2037b8c8941c25e288905903.tar.xz
Fix broken ExtractAddress (refactored, made callers check for addresses in keystore if they care)
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index c35081ce44..28d15ef2e5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -394,7 +394,7 @@ bool CWallet::IsChange(const CTxOut& txout) const
// a better way of identifying which outputs are 'the send' and which are
// 'the change' will need to be implemented (maybe extend CWalletTx to remember
// which output, if any, was change).
- if (ExtractAddress(txout.scriptPubKey, this, address))
+ if (ExtractAddress(txout.scriptPubKey, address) && HaveKey(address))
CRITICAL_BLOCK(cs_wallet)
if (!mapAddressBook.count(address))
return true;
@@ -475,7 +475,7 @@ void CWalletTx::GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, l
{
CBitcoinAddress address;
vector<unsigned char> vchPubKey;
- if (!ExtractAddress(txout.scriptPubKey, NULL, address))
+ if (!ExtractAddress(txout.scriptPubKey, address))
{
printf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
this->GetHash().ToString().c_str());