aboutsummaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-01-20 13:10:01 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-01-20 13:10:01 -0500
commitd9574c2f14028297ad5121695a0c10e517bf638e (patch)
tree6f5adb8c454cf303c63ba7363e675501ac4b9b51 /init.cpp
parent1d23c7436164faa0b1822acf5ce9507bf6ff257a (diff)
downloadbitcoin-d9574c2f14028297ad5121695a0c10e517bf638e.tar.xz
Reconcile getbalance and listaccounts 0 in the shared-wallet case
If you copied your wallet and used it on two different machines, the balance reported by getbalance and the sum(listaccounts) could disagree, because you might receive payments for an address that is in your wallet but not your address book. Now all such transactions are credited to the default empty-string account.
Diffstat (limited to 'init.cpp')
-rw-r--r--init.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.cpp b/init.cpp
index e114d80727..d93eaba795 100644
--- a/init.cpp
+++ b/init.cpp
@@ -346,6 +346,9 @@ bool AppInit2(int argc, char* argv[])
return false;
}
+ if (GetBoolArg("-rescan"))
+ ScanForWalletTransactions(pindexGenesisBlock);
+
// Add wallet transactions that aren't already in a block to mapTransactions
ReacceptWalletTransactions();