| 41 | { |
| 42 | public: |
| 43 | explicit PCPTestingSetup(const ChainType chainType = ChainType::MAIN, |
| 44 | TestOpts opts = {}) |
| 45 | : BasicTestingSetup{chainType, opts}, |
| 46 | m_create_sock_orig{CreateSock} |
| 47 | { |
| 48 | const std::optional<CService> local_ipv4{Lookup("192.168.0.6", 1, false)}; |
| 49 | const std::optional<CService> local_ipv6{Lookup("2a10:1234:5678:9abc:def0:1234:5678:9abc", 1, false)}; |
| 50 | const std::optional<CService> gateway_ipv4{Lookup("192.168.0.1", 1, false)}; |
| 51 | const std::optional<CService> gateway_ipv6{Lookup("2a10:1234:5678:9abc:def0:0000:0000:0000", 1, false)}; |
| 52 | BOOST_REQUIRE(local_ipv4 && local_ipv6 && gateway_ipv4 && gateway_ipv6); |
| 53 | default_local_ipv4 = *local_ipv4; |
| 54 | default_local_ipv6 = *local_ipv6; |
| 55 | default_gateway_ipv4 = *gateway_ipv4; |
| 56 | default_gateway_ipv6 = *gateway_ipv6; |
| 57 | |
| 58 | struct in_addr inaddr_any; |
| 59 | inaddr_any.s_addr = htonl(INADDR_ANY); |
| 60 | bind_any_ipv4 = CNetAddr(inaddr_any); |
| 61 | } |
| 62 | |
| 63 | ~PCPTestingSetup() |
| 64 | { |