mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
rpc/*,rest: Add review-only assertion to EnsureChainman
This commit is contained in:
parent
cced0f46c9
commit
d0abf0bf42
1 changed files with 1 additions and 0 deletions
|
@ -79,6 +79,7 @@ ChainstateManager& EnsureChainman(const std::any& context)
|
||||||
if (!node.chainman) {
|
if (!node.chainman) {
|
||||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Node chainman not found");
|
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;
|
return *node.chainman;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue