This PR:
- moves warnings from common to the node library and into the node namespace (as suggested in #29845 (review))
- generalizes the warnings interface to Warnings::Set()andWarnings::Unset()methods, instead of having a separate function and globals for each warning. As a result, this simplifies thekernel::Notificationsinterface.
- removes warnings.cpp from the kernel library
- removes warning globals
- adds testing for the warning logic
Behaviour change introduced:
- the -alertnotifycommand is executed for allKernelNotifications::warningSetcalls, which now also covers theLARGE_WORK_INVALID_CHAINwarning
- the GUI is updated automatically whenever a warning is (un)set, covering some code paths where it previously wouldn’t be, e.g. when node::AbortNode()is called, or for theLARGE_WORK_INVALID_CHAINwarning
Some discussion points:
- isedit: updated approach to use- const std::string& idthe best way to refer to warnings? Enums are an obvious alternative, but since we need to define warnings across libraries, strings seem like a straightforward solution.- node::Warningand- kernel::Warningenums.