aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2017-06-23 09:51:59 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2017-06-29 17:48:12 +0200
commit06c5b6edd33213a410d9f128524e74ba076f7ba0 (patch)
tree33dd299eaaa179d6745725d46e4c4bbcd20dc7b8 /src/txdb.cpp
parent316fcb5106b90f3dd7a2dced2063e237539e75b4 (diff)
Show txdb upgrade progress in debug log
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 6f1d482478..6eff52f050 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -369,7 +369,8 @@ bool CCoinsViewDB::Upgrade() {
}
int64_t count = 0;
- LogPrintf("Upgrading database...\n");
+ LogPrintf("Upgrading utxo-set database...\n");
+ LogPrintf("[0%%]...");
size_t batch_size = 1 << 24;
CDBBatch batch(db);
uiInterface.SetProgressBreakAction(StartShutdown);
@@ -383,6 +384,7 @@ bool CCoinsViewDB::Upgrade() {
if (count++ % 256 == 0) {
uint32_t high = 0x100 * *key.second.begin() + *(key.second.begin() + 1);
uiInterface.ShowProgress(_("Upgrading UTXO database") + "\n"+ _("(press q to shutdown and continue later)") + "\n", (int)(high * 100.0 / 65536.0 + 0.5));
+ LogPrintf("[%d%%]...", (int)(high * 100.0 / 65536.0 + 0.5));
}
CCoins old_coins;
if (!pcursor->GetValue(old_coins)) {
@@ -409,5 +411,6 @@ bool CCoinsViewDB::Upgrade() {
}
db.WriteBatch(batch);
uiInterface.SetProgressBreakAction(std::function<void(void)>());
+ LogPrintf("[DONE].\n");
return true;
}