kernel: SanityChecks: Return an error struct

This reduces libbitcoinkernel's coupling with ui_interface and
translation.
This commit is contained in:
Carl Dong
2022-05-25 18:02:54 -04:00
parent 265d6393bf
commit d87784ac87
4 changed files with 31 additions and 12 deletions

View File

@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
// We can't use a goto here, but we can use an assert since none of the
// things instantiated so far requires running the epilogue to be torn down
// properly
assert(kernel::SanityChecks(kernel_context));
assert(!kernel::SanityChecks(kernel_context).has_value());
// Necessary for CheckInputScripts (eventually called by ProcessNewBlock),
// which will try the script cache first and fall back to actually