Make SetMiscWarning() accept bilingual_str argument #19233

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:200610-bi-warn changing 13 files +57 −45
  1. hebasto commented at 9:49 AM on June 10, 2020: member

    This is one more step for consistent usage of bilingual_str.

    No new translation messages are defined.

  2. hebasto cross-referenced this on Jun 10, 2020 from issue gui: Translated messages should not be written to debug log (InitError, InitWarning, ...) by MarcoFalke
  3. fanquake added the label Refactoring on Jun 10, 2020
  4. in src/warnings.cpp:15 in 45cb61a835 outdated
      12 |  
      13 | -static Mutex g_warnings_mutex;
      14 | -static std::string strMiscWarning GUARDED_BY(g_warnings_mutex);
      15 | +#include <vector>
      16 | +
      17 | +static Mutex g_warnings_mutex;;
    


    MarcoFalke commented at 10:01 AM on June 10, 2020:
    static Mutex g_warnings_mutex;
    

    hebasto commented at 10:14 AM on June 10, 2020:
  5. hebasto force-pushed on Jun 10, 2020
  6. hebasto commented at 10:13 AM on June 10, 2020: member

    Updated 45cb61a835711df350ebee6a8ebddb8dc23ab47d -> ddafc58af052741d916a242c4a7df16e468efbdd (pr19233.01 -> pr19233.02, diff):

  7. refactor: Make GetWarnings() bilingual_str aware internally 38e33aa481
  8. Make GetWarnings() return bilingual_str d1ae7c0355
  9. Make SetMiscWarning() accept bilingual_str argument d49612f98a
  10. in src/warnings.cpp:53 in ddafc58af0 outdated
      54 |  
      55 |      // Pre-release build warning
      56 |      if (!CLIENT_VERSION_IS_RELEASE) {
      57 | -        warnings_concise = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
      58 | -        warnings_verbose = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications").translated;
      59 | +        warnings_concise = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications.");
    


    MarcoFalke commented at 11:07 AM on June 10, 2020:

    why change the translation?


    hebasto commented at 12:04 PM on June 10, 2020:
  11. hebasto force-pushed on Jun 10, 2020
  12. hebasto commented at 12:03 PM on June 10, 2020: member

    Updated ddafc58af052741d916a242c4a7df16e468efbdd -> d49612f98add29066817b7c808b76c2d728948e5 (pr19233.02 -> pr19233.03, diff):

    why change the translation?

  13. laanwj commented at 12:49 PM on June 10, 2020: member

    Code review ACK d49612f98add29066817b7c808b76c2d728948e5 I'm somewhat surprised that GetWarnings wasn't one of the first things changed to this paradigm.

  14. DrahtBot commented at 1:39 PM on June 10, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15936 (Unify bitcoin-qt and bitcoind persistent settings by ryanofsky)
    • #15861 (Restore warning for individual unknown version bits, as well as unknown version schemas by luke-jr)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  15. MarcoFalke commented at 1:50 PM on June 10, 2020: member

    tested with

    LC_ALL=de_DE.UTF-8 QT_QPA_PLATFORM=minimal BITCOIND=bitcoin-qt ./test/functional/feature_versionbits_warning.py -l DEBUG --tracerpc
    

    failed with

    <-25- [0.000599] {"blocks": 578, "currentblockweight": 4000, "currentblocktx": 0, "difficulty": "4.656542373906925E-10", "networkhashps": 12, "pooledtx": 0, "chain": "regtest", "warnings": "Warnung: Unbekannte neue Regeln aktiviert (Versionsbit 27)"}
    2020-06-10T13:49:59.737000Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/home/marco/workspace/btc_bitcoin_core/test/functional/test_framework/test_framework.py", line 119, in main
        self.run_test()
      File "./test/functional/feature_versionbits_warning.py", line 98, in run_test
        assert WARN_UNKNOWN_RULES_ACTIVE in node.getmininginfo()["warnings"]
    AssertionError
    

    ACK d49612f98add29066817b7c808b76c2d728948e5 🌂

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK d49612f98add29066817b7c808b76c2d728948e5 🌂
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUh4nwv+IFYF1/2XoeTK/sL9efCjqADnR3EFMgDVjfrQwcNWPDfxRE8H4iZ6cX2X
    FDTGKNrtTKQmyRaPiYIfDIOkrbeJhOmySwwAw9Xu2VVqG5wzZ514aanawaUVUplg
    CZc6yQ5If39j6uLGcdJqgeNd0rxfpsdMiLgPMvJ9Ypj3GN31AvGH1psPZcdUlCwV
    uMzQJyrD9Be5OSwT3ysg6pvVEIDWzySzBSyvdECLkDtxeSFWoCYOwSp/42i2rQCt
    GkxTwr1fvOAbUbiJSvd0FzgUNszb1wtKujAmDNZUmEjYNYWKAEQYwrgzxKEbuCaL
    aONEn/UOm6nwpUm2D+h73zGPk9du1TU7iUbbN/iaJyJToq7i+ZElwaIQXzqXIgwx
    TKt/5qq3UKvDOPNXDbrCBjxBUu66AvqktmfnUXUiL9wTSxClii1fHuOrATOnoMMt
    1FWTIylffIVsF10GHaUvUNVUN0WaMFxoRmAj6WJIML4cw/DGpgo3mFWIhPNu9s8a
    CVh78fr0
    =BUAL
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash dc976d1ef749013b37bb9e53e592084eef4fed150188607acf86340ed873f7e0 -

    </details>

  16. MarcoFalke merged this on Jun 10, 2020
  17. MarcoFalke closed this on Jun 10, 2020

  18. hebasto deleted the branch on Jun 10, 2020
  19. ryanofsky cross-referenced this on Jun 11, 2020 from issue interfaces: Expose settings.json methods to GUI by ryanofsky
  20. Fabcien referenced this in commit 1a0013532d on May 31, 2021
  21. bitcoin locked this on Feb 15, 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-05-20 06:54 UTC