aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wallet.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 68283c9e80..f275853528 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -269,7 +269,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