remove unnecessary newline from initWarning() argument #21516

pull LarryRuane wants to merge 1 commits into bitcoin:master from LarryRuane:rm-unnecessary-newline changing 2 files +2 −2
  1. LarryRuane commented at 9:28 PM on March 23, 2021: contributor

    Run: src/bitcoind -wallet=nosuchfile

    Without this patch, debug.log contains:

    2021-03-23T21:19:16Z init message: Verifying wallet(s)...
    2021-03-23T21:19:16Z Warning: Skipping -wallet path that doesn't exist. Failed to load database path '/home/larry/.bitcoin/wallets/nosuchfile'. Path does not exist.
    
    2021-03-23T21:19:16Z init message: Loading banlist...
    

    With this patch, the empty line isn't present. This PR fixes a similar problem with src/bitcoind -conf=nosuchfile

  2. LarryRuane commented at 9:28 PM on March 23, 2021: contributor
  3. practicalswift commented at 10:17 PM on March 23, 2021: contributor

    Concept ACK

    Thanks for fixing this: the command-line interface is an interface worth polishing too :)

    FWIW I think we have the same issue for src/bitcoind -conf=nosuchfile:

    $ git grep -E '[iI]nitWarning\(.*\\n'
    src/init.cpp:        InitWarning(strprintf(_("The specified config file %s does not exist\n"), config_file_path.string()));
    src/wallet/load.cpp:                chain.initWarning(Untranslated(strprintf("Skipping -wallet path that doesn't exist. %s\n", error_string.original)));
    

    Perhaps worth fixing too?

  4. DrahtBot added the label Wallet on Mar 23, 2021
  5. remove unnecessary newline from initWarning() argument 804ac10631
  6. LarryRuane force-pushed on Mar 24, 2021
  7. LarryRuane commented at 10:45 AM on March 24, 2021: contributor

    Thanks, @practicalswift, I've updated the patch as you suggest.

  8. LarryRuane renamed this:
    remove unnecessary newline from chain.initWarning() argument
    remove unnecessary newline from initWarning() argument
    on Mar 24, 2021
  9. practicalswift commented at 2:59 PM on March 24, 2021: contributor

    cr ACK 804ac106313eb52d3a86f42c681b42acf90974c8: patch looks correct!

  10. jarolrod commented at 3:17 PM on March 24, 2021: member

    tACK 804ac106313eb52d3a86f42c681b42acf90974c8, nice catch!

  11. theStack approved
  12. theStack commented at 3:34 PM on March 24, 2021: member

    Code-review ACK 804ac106313eb52d3a86f42c681b42acf90974c8

    Checked that all instances of unnecessary newlines in {init,Init}Warning(...) calls are tackled via git grep -i "initwarning(.*\\\n".

    Thanks for fixing! 👍

  13. MarcoFalke merged this on Mar 24, 2021
  14. MarcoFalke closed this on Mar 24, 2021

  15. sidhujag referenced this in commit 3de9d589f4 on Mar 24, 2021
  16. DrahtBot locked this on Aug 16, 2022

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: 2026-04-21 15:14 UTC

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