From d5115a71a1bd8e769e8aa4009bed7a4f0cf5b510 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 13 Jul 2011 13:05:08 +0200 Subject: [PATCH] Bugfix: add autogenerated addresses to address book --- src/wallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet.cpp b/src/wallet.cpp index a60b0b4f..68697904 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