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

Method IsBanned

src/net.cpp:509–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509bool CConnman::IsBanned(CNetAddr ip)
510{
511 LOCK(cs_setBanned);
512 for (const auto& it : setBanned) {
513 CSubNet subNet = it.first;
514 CBanEntry banEntry = it.second;
515
516 if (subNet.Match(ip) && GetTime() < banEntry.nBanUntil) {
517 return true;
518 }
519 }
520 return false;
521}
522
523bool CConnman::IsBanned(CSubNet subnet)
524{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80
setbanFunction · 0.80

Calls 4

GetTimeFunction · 0.85
MatchMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64