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

Function SeenLocal

src/net.cpp:324–331  ·  view source on GitHub ↗

vote for a local address */

Source from the content-addressed store, hash-verified

322
323/** vote for a local address */
324bool SeenLocal(const CService& addr)
325{
326 LOCK(g_maplocalhost_mutex);
327 const auto it = mapLocalHost.find(addr);
328 if (it == mapLocalHost.end()) return false;
329 it->second.nScore = SaturatingAdd(it->second.nScore, 1);
330 return true;
331}
332
333
334/** check whether a given address is potentially local */

Callers 3

ProcessMessageMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
net.cppFile · 0.85

Calls 3

SaturatingAddFunction · 0.85
findMethod · 0.80
endMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68