This adds a test that checks that network activity is not suspended if dumptxoutset fails in the middle of its process which is implemented with the NetworkDisable
RAII class. I would have liked to add coverage for the TemporaryRollback
RAII class but that seems a lot more tricky since the failure needs to happen at some point after the rollback and on the scale of our test chain here I couldn’t find a way to do it yet. This was requested by pablomartin4btc here: #30808#pullrequestreview-2280450117. To test the test you can comment out the content of the destructor of NetworkDisable
.
It also addresses the feedback by ryanofsky to use std::optional
instead of std::unique_ptr
for the management of the RAII object: #30808 (review)