Which.. isn’t bad as it will remove another ui_interface dependency.
Can you elaborate on this point? AbortNode
still relies on ui_interface
from what I can tell.
Ok, sorry for the confusion.
The ui_interface dependency that can be removed is the base.cpp
one. Thus why said to “bubble up” the error string up to init.cpp
instead of calling InitError
from the index base class Start
method.
From my current understanding both the StartShutdown
in ThreadImport
and in the check are call shutdown and node AbortNode
, because BlockImport
might run before the ui is available (this is me guessing out of historical reasons).
AbortNode
isn’t doing anything special. We already use InitError
in init.cpp
prior spawning the import thread.
What the node will do when there is no gui is print the error to the command line, and the debug file, prior shutting down (using the noui consumer as you said).
I am not sold on this point though, since this runs in another thread and we also provide the noui consumer of the ui interface. So I think these should both become calls to AbortNode
.
Yeah, that is my idea as well. The ThreadImport
“fatal” failures should use AbortNode
.