The code, the bool* ret = nullptr
parameter in the BitcoinGUI::message()
slot, removed in #17943 is not dead actually. It is used in ThreadSafeMessageBox()
function:
https://github.com/bitcoin/bitcoin/blob/a654626f076a72416a3d354218d7107571d6caaf/src/qt/bitcoingui.cpp#L1363-L1368
Now in master (a654626f076a72416a3d354218d7107571d6caaf):
0$ ./src/qt/bitcoin-qt -prune=-1
1Error: Prune cannot be configured with a negative value.
2bitcoin-qt: qt/bitcoingui.cpp:1369: bool ThreadSafeMessageBox(BitcoinGUI*, const string&, const string&, unsigned int): Assertion `invoked' failed.
3Aborted (core dumped)
This PR reverts all commits of #17943
Additional notes: the bug was missed due to dynamic function call QMetaObject::invokeMethod()
which cannot be checked at compile time. See #16348 for more discussion.
Sorry for introducing a bug.