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:
@@ -200,6 +200,7 @@ bool AppInit2(int argc, char* argv[])
|
||||
#else
|
||||
" -upnp \t " + _("Use Universal Plug and Play to map the listening port (default: 0)") + "\n" +
|
||||
#endif
|
||||
" -detachdb \t " + _("Detach block and address databases. Increases shutdown time (default: 0)") + "\n" +
|
||||
#endif
|
||||
" -paytxfee=<amt> \t " + _("Fee per KB to add to transactions you send") + "\n" +
|
||||
#ifdef QT_GUI
|
||||
@@ -255,6 +256,7 @@ bool AppInit2(int argc, char* argv[])
|
||||
}
|
||||
|
||||
fDebug = GetBoolArg("-debug");
|
||||
fDetachDB = GetBoolArg("-detachdb", false);
|
||||
|
||||
#if !defined(WIN32) && !defined(QT_GUI)
|
||||
fDaemon = GetBoolArg("-daemon");
|
||||
|
||||
Reference in New Issue
Block a user