Skip to content

Commit d0abf0b

Browse files
committed
rpc/*,rest: Add review-only assertion to EnsureChainman
1 parent cced0f4 commit d0abf0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/rpc/blockchain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ ChainstateManager& EnsureChainman(const std::any& context)
7979
if (!node.chainman) {
8080
throw JSONRPCError(RPC_INTERNAL_ERROR, "Node chainman not found");
8181
}
82+
WITH_LOCK(::cs_main, CHECK_NONFATAL(std::addressof(g_chainman) == std::addressof(*node.chainman)));
8283
return *node.chainman;
8384
}
8485

0 commit comments

Comments
 (0)