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

Function ResolveService

src/test/addrman_tests.cpp:45–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static CService ResolveService(const std::string& ip, uint16_t port = 0)
46{
47 const std::optional<CService> serv{Lookup(ip, port, false)};
48 BOOST_CHECK_MESSAGE(serv.has_value(), strprintf("failed to resolve: %s:%i", ip, port));
49 return serv.value_or(CService{});
50}
51
52BOOST_FIXTURE_TEST_SUITE(addrman_tests, BasicTestingSetup)
53

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

LookupFunction · 0.85
has_valueMethod · 0.45
value_orMethod · 0.45

Tested by

no test coverage detected