MCPcopy Create free account
hub / github.com/LUX-Core/lux / PushAddress

Method PushAddress

src/net.h:467–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465 }
466
467 void PushAddress(const CAddress& addr)
468 {
469 // Known checking here is only to save space from duplicates.
470 // SendMessages will filter it again for knowns that were added
471 // after addresses were pushed.
472 if (addr.IsValid() && !setAddrKnown.count(addr)) {
473 if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) {
474 vAddrToSend[insecure_rand() % vAddrToSend.size()] = addr;
475 } else {
476 vAddrToSend.push_back(addr);
477 }
478 }
479 }
480
481
482 void AddInventoryKnown(const CInv& inv)

Callers 2

ProcessMessageFunction · 0.80
AdvertizeLocalFunction · 0.80

Calls 5

insecure_randFunction · 0.85
IsValidMethod · 0.45
countMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected