| 395 | } |
| 396 | |
| 397 | AddrInfo* AddrManImpl::Create(const CAddress& addr, const CNetAddr& addrSource, nid_type* pnId) |
| 398 | { |
| 399 | AssertLockHeld(cs); |
| 400 | |
| 401 | nid_type nId = nIdCount++; |
| 402 | mapInfo[nId] = AddrInfo(addr, addrSource); |
| 403 | mapAddr[addr] = nId; |
| 404 | mapInfo[nId].nRandomPos = vRandom.size(); |
| 405 | vRandom.push_back(nId); |
| 406 | nNew++; |
| 407 | m_network_counts[addr.GetNetwork()].n_new++; |
| 408 | if (pnId) |
| 409 | *pnId = nId; |
| 410 | return &mapInfo[nId]; |
| 411 | } |
| 412 | |
| 413 | void AddrManImpl::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2) const |
| 414 | { |
nothing calls this directly
no test coverage detected