mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
util/check: Add CHECK_NONFATAL identity function, NONFATAL_UNREACHABLE AND UNREACHABLE macros
This commit is contained in:
parent
e0680bbce8
commit
ee02c8bd9a
7 changed files with 49 additions and 39 deletions
|
|
@ -484,9 +484,8 @@ static RPCHelpMan mockscheduler()
|
|||
throw std::runtime_error("delta_time must be between 1 and 3600 seconds (1 hr)");
|
||||
}
|
||||
|
||||
auto node_context = util::AnyPtr<NodeContext>(request.context);
|
||||
auto node_context = CHECK_NONFATAL(util::AnyPtr<NodeContext>(request.context));
|
||||
// protect against null pointer dereference
|
||||
CHECK_NONFATAL(node_context);
|
||||
CHECK_NONFATAL(node_context->scheduler);
|
||||
node_context->scheduler->MockForward(std::chrono::seconds(delta_seconds));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue