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).
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-
MarcoFalke commented at 7:24 PM on September 6, 2018: member
-
noui: Move handlers to header file dd031e3839
-
qt: Also log and print messages or questions like bitcoind fa7e9694e1
- MarcoFalke added the label GUI on Sep 6, 2018
-
promag commented at 12:31 AM on September 7, 2018: member
utACK fa7e969.
I guess calling
handleMessageBoxand friends is not worth it.BTW
noui.cppis in libbitcoin_server which is shared between bitcoind and bitcoin-qt — initially thoughtnoui.cppwasn't included in bitcoin-qt. -
jonasschnelli commented at 7:19 PM on September 7, 2018: contributor
utACK fa7e9694e1ed5406036620d4bf0b72a2aa984578
-
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 fromboost::signalsin #13961, or earlier, which dropped support for having multiple handlers.utACK fa7e9694e1ed5406036620d4bf0b72a2aa984578 anyhow.
Edit: checked that this does not need backport to 0.17. - laanwj merged this on Sep 11, 2018
- laanwj closed this on Sep 11, 2018
- laanwj referenced this in commit 7ab2837b65 on Sep 11, 2018
- laanwj added the label Bug on Sep 11, 2018
- MarcoFalke deleted the branch on Sep 11, 2018
-
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 $ -
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_connectin the GUImust have imagined it then...
-
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)
-
MarcoFalke commented at 4:35 PM on September 11, 2018: member
Indeed, init messages are both handled. Though, not the errors, warnings and questions.
- Munkybooty referenced this in commit fbd2f3dbe6 on Jul 7, 2021
- Munkybooty referenced this in commit 6463ab1915 on Jul 8, 2021
- Munkybooty referenced this in commit 244dc8f839 on Jul 9, 2021
- Munkybooty referenced this in commit 337de3c6f9 on Jul 11, 2021
- DrahtBot locked this on Sep 8, 2021