rpc/*,rest: Add review-only assertion to EnsureChainman

This commit is contained in:
Carl Dong committed 2021-04-05 11:13:54 -04:00
1 parent cced0f46c9
commit d0abf0bf42
1 file changed
+1
+1
View File
@@ -79,6 +79,7 @@ ChainstateManager& EnsureChainman(const std::any& context)
if (!node.chainman) {
throw JSONRPCError(RPC_INTERNAL_ERROR, "Node chainman not found");
}
WITH_LOCK(::cs_main, CHECK_NONFATAL(std::addressof(g_chainman) == std::addressof(*node.chainman)));
return *node.chainman;
}