aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
diff options
context:
space:
mode:
authorPierre Rochard <pierre@rochard.org>2018-06-15 19:02:52 -0400
committerPierre Rochard <pierre@rochard.org>2018-08-02 12:09:39 -0400
commit909f54c80abb7195c2e82c6e06c414f4526a339e (patch)
treed0bb2bf8350d71c611da2b21b96870285d8351fe /src/wallet/rpcdump.cpp
parent1ef57a96b8b7255bd1f1ea0583846f18305419bf (diff)
downloadbitcoin-909f54c80abb7195c2e82c6e06c414f4526a339e.tar.xz
[wallet] Add wallet name to log messages
After multiple wallets became supported, wallet-related log messages became ambiguous as to which wallet they were being emitted by. fixes #11317
Diffstat (limited to 'src/wallet/rpcdump.cpp')
-rw-r--r--src/wallet/rpcdump.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 3cb4050f01..2a7777a690 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -553,7 +553,7 @@ UniValue importwallet(const JSONRPCRequest& request)
// Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which
// we don't want for this progress bar showing the import progress. uiInterface.ShowProgress does not have a cancel button.
- uiInterface.ShowProgress(_("Importing..."), 0, false); // show progress dialog in GUI
+ uiInterface.ShowProgress(strprintf("%s " + _("Importing..."), pwallet->GetDisplayName()), 0, false); // show progress dialog in GUI
while (file.good()) {
uiInterface.ShowProgress("", std::max(1, std::min(99, (int)(((double)file.tellg() / (double)nFilesize) * 100))), false);
std::string line;
@@ -571,7 +571,7 @@ UniValue importwallet(const JSONRPCRequest& request)
assert(key.VerifyPubKey(pubkey));
CKeyID keyid = pubkey.GetID();
if (pwallet->HaveKey(keyid)) {
- LogPrintf("Skipping import of %s (key already present)\n", EncodeDestination(keyid));
+ pwallet->WalletLogPrintf("Skipping import of %s (key already present)\n", EncodeDestination(keyid));
continue;
}
int64_t nTime = DecodeDumpTime(vstr[1]);
@@ -589,7 +589,7 @@ UniValue importwallet(const JSONRPCRequest& request)
fLabel = true;
}
}
- LogPrintf("Importing %s...\n", EncodeDestination(keyid));
+ pwallet->WalletLogPrintf("Importing %s...\n", EncodeDestination(keyid));
if (!pwallet->AddKeyPubKey(key, pubkey)) {
fGood = false;
continue;
@@ -603,11 +603,11 @@ UniValue importwallet(const JSONRPCRequest& request)
CScript script = CScript(vData.begin(), vData.end());
CScriptID id(script);
if (pwallet->HaveCScript(id)) {
- LogPrintf("Skipping import of %s (script already present)\n", vstr[0]);
+ pwallet->WalletLogPrintf("Skipping import of %s (script already present)\n", vstr[0]);
continue;
}
if(!pwallet->AddCScript(script)) {
- LogPrintf("Error importing script %s\n", vstr[0]);
+ pwallet->WalletLogPrintf("Error importing script %s\n", vstr[0]);
fGood = false;
continue;
}