aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-10-10 14:58:36 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-10-10 14:59:49 +0200
commitb0091bb8961eb9c6eda1aabba7182794b3d0d477 (patch)
treeb20c789b2ceecec61ab22a186d098a249f512853 /src/wallet.cpp
parenta302c21e0b0484fef91673c9072c1af7c278698e (diff)
downloadbitcoin-b0091bb8961eb9c6eda1aabba7182794b3d0d477.tar.xz
wallet: remove automatic update of default key
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 26ffc71e19..6ba91b6603 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -483,25 +483,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
if (!wtx.WriteToDisk())
return false;
- if (!fHaveGUI) {
- // If default receiving address gets used, replace it with a new one
- if (vchDefaultKey.IsValid()) {
- CScript scriptDefaultKey;
- scriptDefaultKey.SetDestination(vchDefaultKey.GetID());
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
- {
- if (txout.scriptPubKey == scriptDefaultKey)
- {
- CPubKey newDefaultKey;
- if (GetKeyFromPool(newDefaultKey))
- {
- SetDefaultKey(newDefaultKey);
- SetAddressBook(vchDefaultKey.GetID(), "", "receive");
- }
- }
- }
- }
- }
// since AddToWallet is called directly for self-originating transactions, check for consumption of own coins
WalletUpdateSpent(wtx);