Bugfix: add autogenerated addresses to address book
authorPieter Wuille <pieter.wuille@gmail.com>
Wed, 13 Jul 2011 11:05:08 +0000 (13:05 +0200)
committerPieter Wuille <pieter.wuille@gmail.com>
Wed, 13 Jul 2011 11:05:08 +0000 (13:05 +0200)
src/wallet.cpp

index a60b0b4..6869790 100644 (file)
@@ -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