Get rid of all ShutdownRequested
calls in validation code by introducing an interrupt object that applications can use to cancel long-running kernel operations.
Replace all AbortNode
calls in validation code with new fatal error and flush error notifications so kernel applications can be notified about failures and choose how to handle them.
This pull request is part of the libbitcoinkernel
project #27587 https://github.com/orgs/bitcoin/projects/3 and more specifically its “Step 2: Decouple most non-consensus code from libbitcoinkernel”.
The pull request mostly allows dropping the kernel dependency on shutdown.cpp. The only dependency left after this is a StartShutdown
call which will be removed in followup PR #27711. This PR also drops the last reference to the uiInterface
global in kernel code. The process of moving the uiInterface
out of the kernel was started in #27636.
This pull request contains a subset of patches originally proposed in #27711. It will be part of a series of changes required to make handling of interrupts (or in other words the current shutdown procedure) in the kernel library more transparent and less reliable on global mutable state. The set of patches contained here was originally proposed by @ryanofsky here.