This drops our dependency on boost::signals2, leaving boost::multi_index as the only remaining boost dependency for bitcoind.
boost::signals2 is a complex beast, but we only use a small portion of it. Namely: it’s a way for multiple subscribers to connect to the same event, and the ability to later disconnect individual subscribers from that event.
btcsignals adheres to the subset of the boost::signals2 API that we currently use, and thus is a drop-in replacement. Rather than implementing a complex slot tracking class that we never used anyway (and which was much more useful in the days before std::function existed), callbacks are simply wrapped directly in std::functions.
The new tests work with either boost::signals2 or the new btcsignals implementation. Reviewers can verify
functional equivalency by running the tests in the commit that introduces them against boost::signals2, then again with btcsignals.
The majority of the commits in this PR are preparation and cleanup. Once boost::signals2 is no longer needed, it is removed from depends. Additionally, a few CMake targets no longer need boost includes as they were previously only required for signals.
I think this is actually pretty straightforward to review. I kept things simple, including keeping types unmovable/uncopyable where possible rather than trying to define those semantics. In doing so, the new implementation has even fewer type requirements than boost, which I believe is due to a boost bug. I’ve opened a PR upstream for that to attempt to maintain parity between the implementations.
See individual commits for more details.
Closes #26442.