aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-03-09 12:02:57 -0500
committerGavin Andresen <gavinandresen@gmail.com>2013-04-03 19:57:53 -0400
commitb31499ec72edd1554d4612d1b54808fce0360e14 (patch)
treea2d03852b9fd6e9595470210479f212ccf4313f1 /src/txdb.cpp
parent21eb5adadbe3110a8708f2570185566e1f137a49 (diff)
Clean up shutdown process
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index ae7aceb7f1..5b0527c76c 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -115,12 +115,13 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
pcursor->SeekToFirst();
while (pcursor->Valid()) {
+ boost::this_thread::interruption_point();
try {
leveldb::Slice slKey = pcursor->key();
CDataStream ssKey(slKey.data(), slKey.data()+slKey.size(), SER_DISK, CLIENT_VERSION);
char chType;
ssKey >> chType;
- if (chType == 'c' && !fRequestShutdown) {
+ if (chType == 'c') {
leveldb::Slice slValue = pcursor->value();
CDataStream ssValue(slValue.data(), slValue.data()+slValue.size(), SER_DISK, CLIENT_VERSION);
CCoins coins;
@@ -178,12 +179,13 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
// Load mapBlockIndex
while (pcursor->Valid()) {
+ boost::this_thread::interruption_point();
try {
leveldb::Slice slKey = pcursor->key();
CDataStream ssKey(slKey.data(), slKey.data()+slKey.size(), SER_DISK, CLIENT_VERSION);
char chType;
ssKey >> chType;
- if (chType == 'b' && !fRequestShutdown) {
+ if (chType == 'b') {
leveldb::Slice slValue = pcursor->value();
CDataStream ssValue(slValue.data(), slValue.data()+slValue.size(), SER_DISK, CLIENT_VERSION);
CDiskBlockIndex diskindex;