aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-10-20 19:40:43 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-10-20 19:40:43 -0700
commit496c2a3542aa04419f8911774df3e8b00afb3de6 (patch)
tree33ccd9b8270f532915d34464a326cf0ce9a3f0e4
parent749230d05c6e27cfcacbe913411050094b1b4d23 (diff)
parentb0091bb8961eb9c6eda1aabba7182794b3d0d477 (diff)
Merge pull request #3074 from laanwj/2013_10_remove_default_key_1
Remove automatic update of default key
-rw-r--r--src/wallet.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 5eb2808920..349498545e 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);