MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / SimConnFail

Method SimConnFail

src/test/addrman_tests.cpp:57–65  ·  view source on GitHub ↗

Simulates connection failure so that we can test eviction of offline nodes

Source from the content-addressed store, hash-verified

55
56 // Simulates connection failure so that we can test eviction of offline nodes
57 void SimConnFail(CService& addr)
58 {
59 int64_t nLastSuccess = 1;
60 Good_(addr, true, nLastSuccess); // Set last good connection in the deep past.
61
62 bool count_failure = false;
63 int64_t nLastTry = GetAdjustedTime()-61;
64 Attempt(addr, count_failure, nLastTry);
65 }
66};
67
68static CNetAddr ResolveIP(const char* ip)

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

GetAdjustedTimeFunction · 0.85

Tested by

no test coverage detected