MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / RandomOrphan

Function RandomOrphan

src/test/DoS_tests.cpp:111–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111CTransaction RandomOrphan()
112{
113 std::map<uint256, COrphanTx>::iterator it;
114 it = mapOrphanTransactions.lower_bound(GetRandHash());
115 if (it == mapOrphanTransactions.end())
116 it = mapOrphanTransactions.begin();
117 return it->second.tx;
118}
119
120BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
121{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

GetRandHashFunction · 0.85
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected