There are two places in assumeutxo code where it is calling AbortNode
to trigger asynchronous shutdowns without returning errors to calling functions.
One case, in LoadChainstate
, happens when snapshot validation succeeds, and there is an error trying to replace the background chainstate with the snapshot chainstate.
The other case, in InvalidateCoinsDBOnDisk
, happens when snapshot validatiion fails, and there is an error trying to remove the snapshot chainstate.
In both cases the node is being forced to shut down, so it makes sense for these functions to raise errors so callers can know that an error happened without having to infer it from the shutdown state.
Noticed these cases while reviewing #27861, which replaces the AbortNode
function with a FatalError
function.