Merge pull request #405 from sipa/syncdefault
authorJeff Garzik <jgarzik@exmulti.com>
Wed, 13 Jul 2011 15:53:57 +0000 (08:53 -0700)
committerJeff Garzik <jgarzik@exmulti.com>
Wed, 13 Jul 2011 15:53:57 +0000 (08:53 -0700)
Bugfix: add autogenerated addresses to address book

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