aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2011-07-13 13:05:08 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2011-07-13 13:05:08 +0200
commitd5115a71a1bd8e769e8aa4009bed7a4f0cf5b510 (patch)
tree2c143210cfccde52d4a2204a353b4ccb416a51d0
parente9fd7d9fad9fdb142d039d2a625dd6d50090e495 (diff)
Bugfix: add autogenerated addresses to address book
-rw-r--r--src/wallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a60b0b4fa5..6869790472 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -268,7 +268,10 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
BOOST_FOREACH(const CTxOut& txout, wtx.vout)
{
if (txout.scriptPubKey == scriptDefaultKey)
+ {
SetDefaultKey(GetOrReuseKeyFromPool());
+ SetAddressBookName(PubKeyToAddress(vchDefaultKey), "");
+ }
}
// Notify UI