[wallet] Add wallet name to log messages #12992

pull PierreRochard wants to merge 1 commits into bitcoin:master from PierreRochard:pr/log-wallet-name changing 5 files +66 −54
  1. PierreRochard commented at 10:25 pm on April 15, 2018: contributor

    After multiple wallets became supported, wallet-related log messages became ambiguous as to which wallet they were being emitted by.

    This pull request adds a CWallet::WalletLogPrintf function to be used when logging wallet-specific events. This function prepends the wallet’s name to the log message and forwards it to LogPrintf

    fixes #11317

  2. fanquake added the label Wallet on Apr 15, 2018
  3. PierreRochard commented at 10:35 pm on April 15, 2018: contributor

    Thank you @dooglus for bringing attention to this in #11317 and opening #11320.

    This is #11320 with the following changes:

    • rebased on master
    • added the wallet name in three additional logging messages for rpcdump.cpp’s importwallet function

    In #11320 @promag and @luke-jr suggested approaches to reducing the repetition of "[%s]" GetName() boilerplate. @jimpo, in the context of #12954, what are your thoughts?

    This is outside of the scope of this PR and may be controversial, but I do think we would benefit from automated testing of log messages. This could either be done by checking the debug.log of nodes in existing tests, or as a separate test script.

    Open questions:

    1. There are logging calls in two WalletBatch methods where it’s not immediately apparent to me how to get the wallet’s name: WalletBatch::FindWalletTx and WalletBatch::RecoverKeysOnlyFilter. Is there something I’m not seeing? If the only solution is refactoring then I’ll leave them alone in this PR.

    2. CWallet’s m_name defaults to an empty string, so we end up with lots of empty square brackets in the log messages. Should we have a default wallet name?

  4. MarcoFalke added this to the milestone 0.17.0 on Apr 15, 2018
  5. jimpo commented at 5:39 am on April 16, 2018: contributor

    I luke-jr’s suggestion of CWallet::LogPrintf. The main benefit is not even reducing boilerplate, it’s to reduce the amount of refactoring required if someone decides that there is a better way of presenting the wallet info on the log line. Also, I think it’ll be more obvious that way when people add new log statements in wallet files as compared to noticing the extra log argument and having to realize that it’s a standard.

    With regards to #12954, I don’t see any issues. Won’t even be a git conflict, I don’t think.

    This is an example of a case where structured logging might be useful (being able to tag log statments with key-value pairs in a not-ad-hoc way). I know the Bitcoin ABC team is thinking about this.

  6. MarcoFalke commented at 1:25 pm on April 16, 2018: member
    Agree that it makes sense to move this to CWallet::LogPrintf instead.
  7. in src/wallet/rpcdump.cpp:563 in 2a967c9c58 outdated
    553@@ -554,7 +554,7 @@ UniValue importwallet(const JSONRPCRequest& request)
    554 
    555         // Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which
    556         // we don't want for this progress bar shoing the import progress. uiInterface.ShowProgress does not have a cancel button.
    557-        uiInterface.ShowProgress(_("Importing..."), 0, false); // show progress dialog in GUI
    558+        uiInterface.ShowProgress(strprintf(_("[%s] Importing..."), pwallet->GetName()), 0, false); // show progress dialog in GUI
    


    MarcoFalke commented at 1:27 pm on April 16, 2018:
    Weird ascii characters should not be translated. You can keep the _("Importing...") and do the string manipulation afterward
  8. jnewbery commented at 2:03 pm on April 16, 2018: member
    Concept ACK. I agree that CWallet::LogPrintf would be useful.
  9. PierreRochard force-pushed on Jun 1, 2018
  10. PierreRochard force-pushed on Jun 16, 2018
  11. PierreRochard commented at 1:57 pm on June 16, 2018: contributor

    Unfortunately CWallet::LogPrintf doesn’t play nice with the LogPrintf macro so I created a CWallet::WalletLogPrintf function, using a variadic template to forward args to the macro. Creative solutions to avoid the double namespacing are welcome

    https://github.com/PierreRochard/bitcoin/commit/45343a251306000501654d1dc015dd88501e271dhttps://github.com/PierreRochard/bitcoin/commit/77152113c9939d4ba7b6e8f22ec4d07703d1891b force push diff here

  12. in src/wallet/wallet.h:1204 in 77152113c9 outdated
    1197@@ -1198,6 +1198,11 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
    1198 
    1199     /** Whether a given output is spendable by this wallet */
    1200     bool OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const;
    1201+
    1202+    template<typename... Params>
    1203+    void WalletLogPrintf(std::string fmt, Params... parameters) const {
    1204+        LogPrintf(("[" + GetName() + "] " + fmt).c_str(), parameters...);
    


    jnewbery commented at 2:14 pm on June 21, 2018:

    This results in empty brackets at the start of the log if the default is being used, eg:

    02018-06-21T14:12:32.172374Z init message: [] Loading wallet...
    12018-06-21T14:12:32.174733Z [] nFileVersion = 169900
    22018-06-21T14:12:32.174776Z [] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0
    32018-06-21T14:12:32.175201Z [] Performing wallet upgrade to 169900
    

    Any thoughts about only adding the prefix if the wallet name is non-empty?


    PierreRochard commented at 7:12 pm on June 22, 2018:
    Agree empty is ugly, I’m ended up changing it to be like the GUI and put default wallet there instead, so that it’s explicit.
  13. in src/wallet/wallet.cpp:4059 in 77152113c9 outdated
    4055@@ -4057,7 +4056,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
    4056         }
    4057     }
    4058 
    4059-    uiInterface.InitMessage(_("Loading wallet..."));
    4060+    uiInterface.InitMessage(strprintf(_("[%s] Loading wallet..."), walletFile));
    


    jnewbery commented at 2:16 pm on June 21, 2018:

    nit: This looks a bit weird in the logs compared to the other messages:

    02018-06-21T14:12:32.894599Z init message: [w1] Loading wallet...
    

    (ie the [<wallet_name>] prefix is not at the start of the log). Maybe just change to:

    0    uiInterface.InitMessage(strprintf(_("Loading wallet %s ..."), walletFile));
    

    PierreRochard commented at 7:12 pm on June 22, 2018:
    Fixed
  14. in src/wallet/wallet.cpp:4057 in 77152113c9 outdated
    4105         else
    4106-            LogPrintf("Allowing wallet upgrade up to %i\n", nMaxVersion);
    4107+            walletInstance->WalletLogPrintf("Allowing wallet upgrade up to %i\n", nMaxVersion);
    4108         if (nMaxVersion < walletInstance->GetVersion())
    4109         {
    4110             InitError(_("Cannot downgrade wallet"));
    


    jnewbery commented at 2:20 pm on June 21, 2018:

    There are a couple of logs lower down that you’ve missed:

    • LogPrintf("Upgrading wallet to HD\n"); (L4131)
    • LogPrintf("Upgrading wallet to use HD chain split\n"); (L4143)

    PierreRochard commented at 7:12 pm on June 22, 2018:
    Fixed

    MarcoFalke commented at 8:54 pm on August 1, 2018:
    Is this one fixed?
  15. in src/wallet/feebumper.cpp:198 in 77152113c9 outdated
    194@@ -195,7 +195,7 @@ Result CreateTransaction(const CWallet* wallet, const uint256& txid, const CCoin
    195     // If the output would become dust, discard it (converting the dust to fee)
    196     poutput->nValue -= nDelta;
    197     if (poutput->nValue <= GetDustThreshold(*poutput, GetDiscardRate(*wallet, ::feeEstimator))) {
    198-        LogPrint(BCLog::RPC, "Bumping fee and discarding dust output\n");
    199+        LogPrint(BCLog::RPC, "[%s] Bumping fee and discarding dust output\n", wallet->GetName());
    


    jnewbery commented at 2:21 pm on June 21, 2018:
    I think this should just be changed to a WalletLogPrintf. I don’t think this needs to be in the RPC category.

    PierreRochard commented at 7:13 pm on June 22, 2018:
    Fixed
  16. jnewbery commented at 2:30 pm on June 21, 2018: member

    Tested ACK 77152113c9939d4ba7b6e8f22ec4d07703d1891b.

    A few nits inline.

    The log format conflicts slightly with #13168, which prefixes the log with [<thread_name>]. It’ll make the logic a little more tricky for log parsing tools to deal with the possibility of one or two bracketed prefixes, but it’s probably not that big a deal.

    I agree with @jimpo that structured logging could be a good way to go in future. That’d obviously be a separate PR.

  17. PierreRochard force-pushed on Jun 22, 2018
  18. PierreRochard commented at 7:13 pm on June 22, 2018: contributor
  19. in src/wallet/wallet.h:1206 in 553b1a7f81 outdated
    1197@@ -1198,6 +1198,11 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
    1198 
    1199     /** Whether a given output is spendable by this wallet */
    1200     bool OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const;
    1201+
    1202+    template<typename... Params>
    


    l2a5b1 commented at 9:02 pm on July 6, 2018:
    A minor improvement could be to separate logging from the wallet interface by (i) implementing WalletLogPrintf as a non-member function; or (ii) implementing a CWallet::GetDebugString(...)-like method that returns the debug string, which can be passed to the LogPrintf macro.

    Empact commented at 4:10 am on July 9, 2018:
    Maybe a method like CWallet::DisplayName is called for - the concept is used in e.g. https://github.com/bitcoin/bitcoin/blob/88a15ebc8d317a6fd4851adb344ff944d497284c/src/qt/bitcoingui.cpp#L509

    PierreRochard commented at 11:33 pm on July 19, 2018:
    @251Labs I was hoping that there’d be an approach so that the logging user can call LogPrintf and not have to think about the context - the macro or some other magic would automatically add the wallet name if it’s available in that context. Ultimately I think that kind of improvement would be part of a wider (structured) logging refactoring. @Empact agree, I’ve factored out a CWallet::GetDisplayName and added calls to it in relevant parts

    l2a5b1 commented at 12:59 pm on July 20, 2018:

    Thanks @PierreRochard, yeah you’re absolutely right about that.

    I was thinking about something more straightforward.

    The gist of my suggestion was to just extract (or remove) WalletLogPrintf from the wallet for the advantages that this may provide.

    When extracted the signature of WalletLogPrintf could look something like this:

    0template<typename... Params> 
    1void WalletLogPrintf(const CWallet* wallet, const std::string& fmt, const Params&... parameters) {
    2    ...
    3};
    

    and would be used like:

    0WalletLogPrintf(pWallet, "#reckless");
    

    Imo WalletLogPrintf meets the recommendation: “A function that can be simply, elegantly, and efficiently implemented as a freestanding function (that is, as a nonmember function) should be implemented outside the class. ” from Stroustrup.

    Anyway, this comment is just to clarify what I meant. It is not critical and it’s probably best to ignore it :)

  20. l2a5b1 commented at 9:26 pm on July 6, 2018: contributor
    Nice job @PierreRochard! Tested ACK 553b1a7. Feedback is not critical, feel free to ignore it.
  21. in src/wallet/rpcdump.cpp:563 in 553b1a7f81 outdated
    559@@ -560,7 +560,7 @@ UniValue importwallet(const JSONRPCRequest& request)
    560 
    561         // Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which
    562         // we don't want for this progress bar showing the import progress. uiInterface.ShowProgress does not have a cancel button.
    563-        uiInterface.ShowProgress(_("Importing..."), 0, false); // show progress dialog in GUI
    564+        uiInterface.ShowProgress(strprintf(_("[%s] Importing..."), pwallet->GetName()), 0, false); // show progress dialog in GUI
    


    Empact commented at 4:13 am on July 9, 2018:
    Seems like a need for GetDisplayName here.

    PierreRochard commented at 11:33 pm on July 19, 2018:
    Fixed
  22. achow101 commented at 9:20 pm on July 18, 2018: member
    Needs rebase
  23. DrahtBot added the label Needs rebase on Jul 18, 2018
  24. sipa commented at 9:57 pm on July 19, 2018: member
    Needs trivial rebase after #13500.
  25. in src/wallet/wallet.cpp:1672 in 553b1a7f81 outdated
    1667@@ -1669,8 +1668,8 @@ void CWalletTx::GetAmounts(std::list<COutputEntry>& listReceived,
    1668 
    1669         if (!ExtractDestination(txout.scriptPubKey, address) && !txout.scriptPubKey.IsUnspendable())
    1670         {
    1671-            LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
    1672-                     this->GetHash().ToString());
    1673+            pwallet->WalletLogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",
    1674+                                     this->GetHash().ToString());
    


    l2a5b1 commented at 10:24 pm on July 19, 2018:
    nit: whitespace (alignment is off by one space).

    PierreRochard commented at 11:32 pm on July 19, 2018:
    Fixed
  26. PierreRochard force-pushed on Jul 19, 2018
  27. in src/wallet/wallet.h:1188 in 6d77ba31e7 outdated
    1184@@ -1185,6 +1185,15 @@ class CWallet final : public CCryptoKeyStore, public CValidationInterface
    1185 
    1186     /** Whether a given output is spendable by this wallet */
    1187     bool OutputEligibleForSpending(const COutput& output, const CoinEligibilityFilter& eligibility_filter) const;
    1188+    
    


    achow101 commented at 11:43 pm on July 19, 2018:
    Extra whitespace on this line is causing the linter to fail.

    PierreRochard commented at 11:52 pm on July 19, 2018:
    Ah thank you, I’ll take it as an opportunity to add comments, that should fix it
  28. PierreRochard force-pushed on Jul 19, 2018
  29. achow101 commented at 0:11 am on July 20, 2018: member
    utACK fb71743dbbd188ec3796f6e489f0a73e328bb7cb
  30. DrahtBot removed the label Needs rebase on Jul 20, 2018
  31. PierreRochard force-pushed on Jul 20, 2018
  32. PierreRochard commented at 2:32 pm on July 20, 2018: contributor
    Trivial rebase to resolve conflict with #9662
  33. fanquake added this to the "Blockers" column in a project

  34. skeees commented at 3:34 pm on July 26, 2018: contributor
    utACK dd67b82 on an unrelated note the force push diffs are great (i’m guessing you have some automated solution that does those) - would be very cool functionality to put into a bot of some sort
  35. MarcoFalke commented at 3:39 pm on July 26, 2018: member
    @skeees I presume the diff would only be useful if you reviewed the pre-force-push diff as well. In which case you could just do git diff $pre_force_push_commit $new_commit locally (after fetching the objects)
  36. PierreRochard commented at 4:03 pm on July 26, 2018: contributor
    Thank you for the review @skeees, I’ve been manually experimenting with different approaches and I think I’ve found a good way to do it with interdiff + diff2html. I’ll be automating it and integrating it with bitcoinacks.com, if people find it useful I could work with @MarcoFalke to make a bot. @MarcoFalke agree it may only be a marginal improvement
  37. skeees commented at 5:15 pm on July 26, 2018: contributor
    yah - its the sort of thing where the people i know who are pro reviewers have built their own tools to do this already. ideally github would have this, but in lieu of that would be an excellent addition to bitcoinacks when you’ve got the time :)
  38. jtimon commented at 8:23 pm on July 26, 2018: contributor
    utACK dd67b82bbeba948823224d9ab6c2aa2d24730e21
  39. in src/wallet/wallet.h:1219 in dd67b82bbe outdated
    1213+    };
    1214+
    1215+    /** Prepends the wallet name in logging output to ease debugging in multi-wallet use cases */
    1216+    template<typename... Params>
    1217+    void WalletLogPrintf(std::string fmt, Params... parameters) const {
    1218+        LogPrintf((GetDisplayName() + " " + fmt).c_str(), parameters...);
    


    jnewbery commented at 2:39 pm on July 27, 2018:

    sanitize inputs please :)

     0/home/ubuntu/bitcoin
     1→ bcli createwallet "a%ib"
     2{
     3  "name": "a%ib",
     4  "warning": ""
     5}
     6/home/ubuntu/bitcoin
     7→ tail -30 ../.bitcoin/regtest/debug.log
     82018-07-27T14:36:38Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
     92018-07-27T14:36:40Z tor: Error connecting to Tor control socket
    102018-07-27T14:36:40Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    112018-07-27T14:36:44Z tor: Error connecting to Tor control socket
    122018-07-27T14:36:44Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    132018-07-27T14:36:45Z Received a POST request for / from 127.0.0.1:59554
    142018-07-27T14:36:45Z ThreadRPCServer method=createwallet user=bitcoinrpc
    152018-07-27T14:36:45Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    162018-07-27T14:36:45Z Using wallet wallet.dat
    172018-07-27T14:36:45Z BerkeleyEnvironment::Open: LogDir=/home/ubuntu/.bitcoin/regtest/wallets/a%ib/database ErrorFile=/home/ubuntu/.bitcoin/regtest/wallets/a%ib/db.log
    182018-07-27T14:36:45Z init message: Loading wallet a%ib...
    192018-07-27T14:36:45Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] nFileVersion = %d
    202018-07-27T14:36:45Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total. Unknown wallet records: %u
    212018-07-27T14:36:45Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] Performing wallet upgrade to %i
    222018-07-27T14:36:46Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] keypool added %d keys (%d internal), size=%u (%u internal)
    232018-07-27T14:36:46Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] wallet      %15dms
    242018-07-27T14:36:46Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] setKeyPool.size() = %u
    252018-07-27T14:36:46Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] mapWallet.size() = %u
    262018-07-27T14:36:46Z Error "tinyformat: Too many conversion specifiers in format string" while formatting log message: [a%ib] mapAddressBook.size() = %u
    272018-07-27T14:36:49Z Flushing wallet.dat
    282018-07-27T14:36:49Z Flushed wallet.dat 4ms
    292018-07-27T14:36:49Z tor: Error connecting to Tor control socket
    302018-07-27T14:36:49Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    312018-07-27T14:36:56Z tor: Error connecting to Tor control socket
    322018-07-27T14:36:56Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    332018-07-27T14:37:08Z tor: Error connecting to Tor control socket
    342018-07-27T14:37:08Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    352018-07-27T14:37:25Z tor: Error connecting to Tor control socket
    362018-07-27T14:37:25Z tor: Not connected to Tor control port 127.0.0.1:9051, trying to reconnect
    372018-07-27T14:37:36Z Adding fixed seed nodes as DNS doesn't seem to be available.
    

    MarcoFalke commented at 8:35 pm on August 1, 2018:
    This would probably conflict with unicode support in wallet file names, no?

    MarcoFalke commented at 8:40 pm on August 1, 2018:
    Should probably escape or quote instead.

    PierreRochard commented at 12:30 pm on August 2, 2018:
    @MarcoFalke I definitely agree that escape or quote would be better than sanitize (which simply drops characters), however the only existing escape functions I found were in leveldb, qt, and univalue. Any advice before I try my hand at adding one?

    skeees commented at 12:35 pm on August 2, 2018:

    Rather than adding an escape fn another option is to just

    0LogPrintf("%s " + fmt, GetDisplayName(), parameters...)
    

    MarcoFalke commented at 12:42 pm on August 2, 2018:
    Good point!

    PierreRochard commented at 7:21 pm on August 2, 2018:
    Thank you @skeees! That worked very well
  40. PierreRochard force-pushed on Jul 27, 2018
  41. MarcoFalke commented at 8:51 pm on August 1, 2018: member

    There might be some more instances after you rebase on master:

    0git grep LogPrint ./src/wallet ':(exclude)src/wallet/db.cpp' ':(exclude)src/wallet/init.cpp' ':(exclude)src/wallet/walletdb.cpp' ':(exclude)src/wallet/crypter.cpp' |grep -v WalletLogPrintf| grep -v GetDisplayName
    
  42. in src/wallet/rpcdump.cpp:563 in 237a0f87c9 outdated
    559@@ -560,7 +560,7 @@ UniValue importwallet(const JSONRPCRequest& request)
    560 
    561         // Use uiInterface.ShowProgress instead of pwallet.ShowProgress because pwallet.ShowProgress has a cancel button tied to AbortRescan which
    562         // we don't want for this progress bar showing the import progress. uiInterface.ShowProgress does not have a cancel button.
    563-        uiInterface.ShowProgress(_("Importing..."), 0, false); // show progress dialog in GUI
    564+        uiInterface.ShowProgress(strprintf(_("%s Importing..."), pwallet->GetDisplayName()), 0, false); // show progress dialog in GUI
    


    MarcoFalke commented at 8:52 pm on August 1, 2018:
    If you prefix this, it would be better to not change the translation string. I.e. strprintf("%s " + _("Imp...

    laanwj commented at 11:33 am on August 2, 2018:
    agree (especially if you want this in 0.17.0)

    PierreRochard commented at 7:20 pm on August 2, 2018:
    Fixed
  43. in src/wallet/wallet.cpp:1734 in 237a0f87c9 outdated
    1731+    if (pindex) WalletLogPrintf("Rescan started from block %d...\n", pindex->nHeight);
    1732 
    1733     {
    1734         fAbortRescan = false;
    1735-        ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
    1736+        ShowProgress(strprintf(_("%s Rescanning..."), GetDisplayName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
    


    MarcoFalke commented at 8:53 pm on August 1, 2018:
    Same here and all cases below …

    PierreRochard commented at 7:20 pm on August 2, 2018:
    Fixed
  44. [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
    909f54c80a
  45. PierreRochard force-pushed on Aug 2, 2018
  46. PierreRochard commented at 7:21 pm on August 2, 2018: contributor

    @MarcoFalke Thanks, I found one more after rebasing on to master.

    I avoided changing the InitError related strings as many already have the wallet name. I could fix the one you pointed out which does not - but that would change the translation string and prevent this from being merged into 0.17.0. I’ll create a follow up PR to standardize the formatting of the InitError messages.

    Force push diff here

  47. laanwj commented at 3:36 pm on August 6, 2018: member
    lightly-tested ACK 909f54c80abb7195c2e82c6e06c414f4526a339e
  48. laanwj merged this on Aug 6, 2018
  49. laanwj closed this on Aug 6, 2018

  50. laanwj referenced this in commit 26f59f5054 on Aug 6, 2018
  51. PierreRochard deleted the branch on Aug 6, 2018
  52. fanquake removed this from the "Blockers" column in a project

  53. in src/wallet/wallet.cpp:4008 in 909f54c80a
    4004@@ -4006,7 +4005,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
    4005         }
    4006     }
    4007 
    4008-    uiInterface.InitMessage(_("Loading wallet..."));
    4009+    uiInterface.InitMessage(strprintf(_("Loading wallet %s..."), walletFile));
    


    jnewbery commented at 2:17 pm on August 8, 2018:
    This has changed the translation string. Do we want to revert it before V0.17?

    PierreRochard commented at 3:07 pm on August 8, 2018:
    Yes, reverted in #13911 and I’ll open up a post-0.17 PR for InitMessage, InitWarning, and InitError messages
  54. in src/wallet/wallet.cpp:4220 in 909f54c80a
    4216@@ -4218,7 +4217,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
    4217     walletInstance->m_spend_zero_conf_change = gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE);
    4218     walletInstance->m_signal_rbf = gArgs.GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
    4219 
    4220-    LogPrintf(" wallet      %15dms\n", GetTimeMillis() - nStart);
    4221+    walletInstance->WalletLogPrintf("wallet      %15dms\n", GetTimeMillis() - nStart);
    


    jnewbery commented at 2:19 pm on August 8, 2018:

    Since the format of this log is being changed in this PR, does it make sense to make the log a bit clearer. Something like:

    0"wallet completed loading in %15dms\n", GetTimeMillis() - nStart
    

    PierreRochard commented at 3:07 pm on August 8, 2018:
  55. in src/wallet/wallet.cpp:4273 in 909f54c80a
    4269@@ -4271,7 +4270,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(const std::string& name,
    4270             }
    4271             walletInstance->ScanForWalletTransactions(pindexRescan, nullptr, reserver, true);
    4272         }
    4273-        LogPrintf(" rescan      %15dms\n", GetTimeMillis() - nStart);
    4274+        walletInstance->WalletLogPrintf("rescan      %15dms\n", GetTimeMillis() - nStart);
    


    jnewbery commented at 2:20 pm on August 8, 2018:

    Again, this log could be made clearer as part of this or a follow-up PR:

    0"rescan completed in %15dms\n", GetTimeMillis() - nStart
    

    PierreRochard commented at 3:07 pm on August 8, 2018:
  56. jnewbery commented at 2:22 pm on August 8, 2018: member
    post-merge tested ACK 909f54c80abb7195c2e82c6e06c414f4526a339e. A few nits inline.
  57. MarcoFalke referenced this in commit 3e3a50aeb8 on Aug 9, 2018
  58. jasonbcox referenced this in commit 2720d3db04 on Dec 20, 2019
  59. jonspock referenced this in commit ef730e104b on Oct 2, 2020
  60. jonspock referenced this in commit 8e7f5f1f47 on Oct 5, 2020
  61. jonspock referenced this in commit b27771b588 on Oct 10, 2020
  62. UdjinM6 referenced this in commit 20b0020578 on Jun 30, 2021
  63. UdjinM6 referenced this in commit f1fe92f86b on Jun 30, 2021
  64. UdjinM6 referenced this in commit c83226b577 on Jul 1, 2021
  65. UdjinM6 referenced this in commit f1a20df0df on Jul 1, 2021
  66. UdjinM6 referenced this in commit 4f8042a3a3 on Jul 2, 2021
  67. UdjinM6 referenced this in commit e3c64a7224 on Jul 2, 2021
  68. UdjinM6 referenced this in commit 84794d9cc0 on Jul 2, 2021
  69. UdjinM6 referenced this in commit 06d9afa13d on Jul 2, 2021
  70. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me