aboutsummaryrefslogtreecommitdiff
path: root/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2011-01-20 13:10:01 -0500
committerGavin Andresen <[email protected]>2011-01-20 13:10:01 -0500
commitd9574c2f14028297ad5121695a0c10e517bf638e (patch)
tree6f5adb8c454cf303c63ba7363e675501ac4b9b51 /init.cpp
parentReacceptWalletTransactions bugfix (diff)
downloaddiscoin-d9574c2f14028297ad5121695a0c10e517bf638e.tar.xz
discoin-d9574c2f14028297ad5121695a0c10e517bf638e.zip
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 e114d8072..d93eaba79 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();