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

Function LookupNumeric

src/netbase.cpp:216–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216CService LookupNumeric(const std::string& name, uint16_t portDefault, DNSLookupFn dns_lookup_function)
217{
218 if (!ContainsNoNUL(name)) {
219 return {};
220 }
221 // "1.2:345" will fail to resolve the ip, but will still set the port.
222 // If the ip fails to resolve, re-init the result.
223 return Lookup(name, portDefault, /*fAllowLookup=*/false, dns_lookup_function).value_or(CService{});
224}
225
226bool IsUnixSocketPath(const std::string& name)
227{

Callers 8

get_socks_cbMethod · 0.85
add_onion_cbMethod · 0.85
GetAddedNodeInfoMethod · 0.85
AddNodeMethod · 0.85
AddPeerMethod · 0.85
TestParseFunction · 0.85
FUZZ_TARGETFunction · 0.85
validateMethod · 0.85

Calls 3

ContainsNoNULFunction · 0.85
LookupFunction · 0.85
value_orMethod · 0.45

Tested by 3

AddPeerMethod · 0.68
TestParseFunction · 0.68
FUZZ_TARGETFunction · 0.68