Make lsn_reset ("detach databases") optional and off by default.

Add an option -detachdb (and entry in OptionDialog), without which no
lsn_reset is called on addr.dat and blkindex.dat. That means these
files cannot be moved to a new environment, but shutdown can be
significantly faster. The wallet file is always lsn_reset'ed.

-detachdb corresponds to the old behaviour, though it is off by
default now to speed up shutdowns.
This commit is contained in:
Pieter Wuille
2012-04-17 23:03:24 +02:00
parent c2e8c8acd8
commit 83743ed681
6 changed files with 27 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ class CWallet;
class CWalletTx;
extern unsigned int nWalletDBUpdated;
extern bool fDetachDB;
extern DbEnv dbenv;
extern void DBFlush(bool fShutdown);