Allow to shut down during txdb upgrade

This commit is contained in:
Jonas Schnelli
2017-06-23 09:33:31 +02:00
parent 00cb69bc86
commit ae09d4583b
2 changed files with 6 additions and 2 deletions

View File

@ -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;