MCPcopy Create free account
hub / github.com/ElementsProject/elements / Create

Method Create

src/addrman.cpp:415–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415AddrInfo* AddrManImpl::Create(const CAddress& addr, const CNetAddr& addrSource, nid_type* pnId)
416{
417 AssertLockHeld(cs);
418
419 nid_type nId = nIdCount++;
420 mapInfo[nId] = AddrInfo(addr, addrSource);
421 mapAddr[addr] = nId;
422 mapInfo[nId].nRandomPos = vRandom.size();
423 vRandom.push_back(nId);
424 if (pnId)
425 *pnId = nId;
426 return &mapInfo[nId];
427}
428
429void AddrManImpl::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) const
430{

Callers

nothing calls this directly

Calls 3

AddrInfoClass · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected