Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 697 Lines • ▼ Show 20 Lines | bool fGood = true; | ||||
// Use uiInterface.ShowProgress instead of pwallet.ShowProgress because | // Use uiInterface.ShowProgress instead of pwallet.ShowProgress because | ||||
// pwallet.ShowProgress has a cancel button tied to AbortRescan which we | // pwallet.ShowProgress has a cancel button tied to AbortRescan which we | ||||
// don't want for this progress bar showing the import progress. | // don't want for this progress bar showing the import progress. | ||||
// uiInterface.ShowProgress does not have a cancel button. | // uiInterface.ShowProgress does not have a cancel button. | ||||
// show progress dialog in GUI | // show progress dialog in GUI | ||||
pwallet->chain().showProgress( | pwallet->chain().showProgress( | ||||
strprintf("%s " + _("Importing..."), pwallet->GetDisplayName()), 0, | strprintf("%s " + _("Importing...").translated, | ||||
false); | pwallet->GetDisplayName()), | ||||
0, false); | |||||
std::vector<std::tuple<CKey, int64_t, bool, std::string>> keys; | std::vector<std::tuple<CKey, int64_t, bool, std::string>> keys; | ||||
std::vector<std::pair<CScript, int64_t>> scripts; | std::vector<std::pair<CScript, int64_t>> scripts; | ||||
while (file.good()) { | while (file.good()) { | ||||
pwallet->chain().showProgress( | pwallet->chain().showProgress( | ||||
"", | "", | ||||
std::max(1, std::min<int>(50, 100 * double(file.tellg()) / | std::max(1, std::min<int>(50, 100 * double(file.tellg()) / | ||||
double(nFilesize))), | double(nFilesize))), | ||||
false); | false); | ||||
▲ Show 20 Lines • Show All 1,024 Lines • Show Last 20 Lines |