gui: Also log and print messages or questions like bitcoind #14162

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:Mf1808-uiSignals2 changing 4 files +22 −8
  1. MarcoFalke commented at 7:24 PM on September 6, 2018: member

    Testing and debugging after shutdown are harder if the node was run through the gui, because errors and warnings would not be logged to the debug.log or written to the stderr (as is the case for bitcoind).

  2. noui: Move handlers to header file dd031e3839
  3. qt: Also log and print messages or questions like bitcoind fa7e9694e1
  4. MarcoFalke added the label GUI on Sep 6, 2018
  5. promag commented at 12:31 AM on September 7, 2018: member

    utACK fa7e969.

    I guess calling handleMessageBox and friends is not worth it.

    BTW noui.cpp is in libbitcoin_server which is shared between bitcoind and bitcoin-qt — initially thought noui.cpp wasn't included in bitcoin-qt.

  6. jonasschnelli commented at 7:19 PM on September 7, 2018: contributor

    utACK fa7e9694e1ed5406036620d4bf0b72a2aa984578

  7. laanwj commented at 6:41 AM on September 11, 2018: member

    I'm fairly sure that this used to be the behavior, the noui handlers were always registered.

    But it regressed when moving away from boost::signals in #13961, or earlier, which dropped support for having multiple handlers.

    utACK fa7e9694e1ed5406036620d4bf0b72a2aa984578 anyhow.

    Edit: checked that this does not need backport to 0.17.

  8. laanwj merged this on Sep 11, 2018
  9. laanwj closed this on Sep 11, 2018

  10. laanwj referenced this in commit 7ab2837b65 on Sep 11, 2018
  11. laanwj added the label Bug on Sep 11, 2018
  12. MarcoFalke deleted the branch on Sep 11, 2018
  13. MarcoFalke commented at 2:33 PM on September 11, 2018: member

    @laanwj I am pretty sure this has always been the case.

    Also, it exists on 0.17:

    $ ./src/qt/bitcoin-qt -regtest -walletdir=/tmp/aaaab
    $
    

    master:

    $ ./src/qt/bitcoin-qt -regtest -walletdir=/tmp/aaaab
    Error: Specified -walletdir "/tmp/aaaab" does not exist
    $
    
  14. laanwj commented at 4:24 PM on September 11, 2018: member

    seems you're right, i've checked back as far as 0.10.0 and there's no noui_connect in the GUI

    must have imagined it then...

  15. laanwj commented at 4:33 PM on September 11, 2018: member

    I think I was confused with InitMessage, both qt and the noui implementation have (before this PR):

    static void InitMessage(const std::string &message)
    {
        LogPrintf("init message: %s\n", message);
    }
    

    so they were logged for both the GUI and with bitcoind

    the init window also subscribes to this handler, but that's no problem, as multiple handlers for these signals are still supported (in contrast to what I thought)

  16. MarcoFalke commented at 4:35 PM on September 11, 2018: member

    Indeed, init messages are both handled. Though, not the errors, warnings and questions.

  17. Munkybooty referenced this in commit fbd2f3dbe6 on Jul 7, 2021
  18. Munkybooty referenced this in commit 6463ab1915 on Jul 8, 2021
  19. Munkybooty referenced this in commit 244dc8f839 on Jul 9, 2021
  20. Munkybooty referenced this in commit 337de3c6f9 on Jul 11, 2021
  21. 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-17 06:15 UTC

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