diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-17 23:03:24 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-26 00:31:54 +0200 |
commit | 83743ed6810cfe6a0c0c260fa2477dffbe05950c (patch) | |
tree | 2b151b9c1453fcdd0da74deb9431ec2db29e15a7 /src/qt/optionsdialog.cpp | |
parent | c2e8c8acd8ae0c94c70b59f55169841ad195bb99 (diff) |
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.
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r-- | src/qt/optionsdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 8233e42c25..59c44ac5f9 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -38,6 +38,7 @@ private: QCheckBox *minimize_on_close; #endif QCheckBox *connect_socks4; + QCheckBox *detach_database; QLineEdit *proxy_ip; QLineEdit *proxy_port; BitcoinAmountField *fee_edit; @@ -229,6 +230,10 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): layout->addLayout(fee_hbox); + detach_database = new QCheckBox(tr("Detach databases at shutdown")); + detach_database->setToolTip(tr("Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.")); + layout->addWidget(detach_database); + layout->addStretch(1); // Extra space at bottom setLayout(layout); @@ -256,6 +261,7 @@ void MainOptionsPage::setMapper(MonitoredDataMapper *mapper) mapper->addMapping(proxy_ip, OptionsModel::ProxyIP); mapper->addMapping(proxy_port, OptionsModel::ProxyPort); mapper->addMapping(fee_edit, OptionsModel::Fee); + mapper->addMapping(detach_database, OptionsModel::DetachDatabases); } DisplayOptionsPage::DisplayOptionsPage(QWidget *parent): |