From 06c5b6edd33213a410d9f128524e74ba076f7ba0 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 23 Jun 2017 09:51:59 +0200 Subject: Show txdb upgrade progress in debug log --- src/txdb.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()); + LogPrintf("[DONE].\n"); return true; } -- cgit v1.2.3