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

Function ClientAllowed

src/httpserver.cpp:81–89  ·  view source on GitHub ↗

Check if a network address is allowed to access the HTTP server */

Source from the content-addressed store, hash-verified

79
80/** Check if a network address is allowed to access the HTTP server */
81static bool ClientAllowed(const CNetAddr& netaddr)
82{
83 if (!netaddr.IsValid())
84 return false;
85 for(const CSubNet& subnet : rpc_allow_subnets)
86 if (subnet.Match(netaddr))
87 return true;
88 return false;
89}
90
91/** Initialize ACL list for HTTP server */
92static bool InitHTTPAllowList()

Callers 1

Calls 2

IsValidMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected