aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-06-23 09:33:31 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-06-29 17:48:11 +0200
commitae09d4583b26251e67fa48216ebafb6bcdf2472b (patch)
treee21d6a89dee9ed86302240201eec4a1e41ffda8d /src/txdb.cpp
parent00cb69bc8655b1c17064a7e42453fd049e555076 (diff)
Allow to shut down during txdb upgrade
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index d24162ba2d..3e05683d1e 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -371,6 +371,9 @@ bool CCoinsViewDB::Upgrade() {
CDBBatch batch(db);
while (pcursor->Valid()) {
boost::this_thread::interruption_point();
+ if (ShutdownRequested()) {
+ break;
+ }
std::pair<unsigned char, uint256> key;
if (pcursor->GetKey(key) && key.first == DB_COINS) {
CCoins old_coins;