Simplify GetWarnings() #11412

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2017/09/getwarnings changing 6 files +23 −34
  1. jonasschnelli commented at 3:39 AM on September 28, 2017: contributor

    Stumbled over this while reviewing #10858. Seem that we have an overcomplicated implementation here.

    I think there should be no such things like "statusbar" or "gui" in a non-GUI class (when possible).

    Next step would be to handle multi-warnings on RPC level (move from single string to an array).

  2. Simplify GetWarnings() 6cad8871d1
  3. jonasschnelli added the label Refactoring on Sep 28, 2017
  4. laanwj commented at 6:38 AM on September 28, 2017: member

    I don't see any updates to safemode.cpp here at all so I think you lost it in the simplification: GetWarnings contains hidden logic as to what warnings should trigger safe mode and which should not. Warnings only returned with statusbar and gui but should not trigger safe mode (such as the pre-version warning) should not be returned with rpc.

  5. jonasschnelli commented at 2:13 PM on September 28, 2017: contributor

    Oh... I missed the new safemode.cpp/h in my IDE search-project!

  6. jonasschnelli commented at 2:15 PM on September 28, 2017: contributor

    Closing for now,... maybe I reopen once the safe mode is gone.

  7. laanwj commented at 2:58 PM on September 28, 2017: member

    Yes I think it makes sense to do this as a post-safemode-removal optimization. We should make sure to deprecate it in the 0.16 release notes.

  8. jonasschnelli closed this on Sep 29, 2017

  9. 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: 2026-04-13 15:15 UTC

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