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

Method Delete

src/addrman.cpp:453–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void AddrManImpl::Delete(nid_type nId)
454{
455 AssertLockHeld(cs);
456
457 assert(mapInfo.count(nId) != 0);
458 AddrInfo& info = mapInfo[nId];
459 assert(!info.fInTried);
460 assert(info.nRefCount == 0);
461
462 SwapRandom(info.nRandomPos, vRandom.size() - 1);
463 vRandom.pop_back();
464 mapAddr.erase(info);
465 mapInfo.erase(nId);
466 nNew--;
467}
468
469void AddrManImpl::ClearNew(int nUBucket, int nUBucketPos)
470{

Callers 1

EraseMethod · 0.45

Calls 4

countMethod · 0.80
sizeMethod · 0.45
pop_backMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected