MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetNodeContext

Function GetNodeContext

src/rest.cpp:86–94  ·  view source on GitHub ↗

* Get the node context. * * @param[in] req The HTTP request, whose status code will be set if node * context is not found. * @returns Pointer to the node context or nullptr if not found. */

Source from the content-addressed store, hash-verified

84 * @returns Pointer to the node context or nullptr if not found.
85 */
86static NodeContext* GetNodeContext(const std::any& context, HTTPRequest* req)
87{
88 auto node_context = util::AnyPtr<NodeContext>(context);
89 if (!node_context) {
90 RESTERR(req, HTTP_INTERNAL_SERVER_ERROR, STR_INTERNAL_BUG("Node context not found!"));
91 return nullptr;
92 }
93 return node_context;
94}
95
96/**
97 * Get the node context mempool.

Callers 1

rest_txFunction · 0.85

Calls 1

RESTERRFunction · 0.85

Tested by

no test coverage detected