Skip to content

Commit

Permalink
[Cleanup] Remove CConnman::Copy(Release)NodeVector, now unused
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Aug 25, 2020
1 parent b09da57 commit e733939
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
18 changes: 0 additions & 18 deletions src/net.cpp
Expand Up @@ -2625,21 +2625,3 @@ int64_t PoissonNextSend(int64_t nNow, int average_interval_seconds) {
return CSipHasher(k0, k1).Write(&vchNetGroup[0], vchNetGroup.size()).Finalize();
}

std::vector<CNode*> CConnman::CopyNodeVector()
{
std::vector<CNode*> vecNodesCopy;
LOCK(cs_vNodes);
for(CNode* pnode : vNodes) {
pnode->AddRef();
vecNodesCopy.push_back(pnode);
}
return vecNodesCopy;
}

void CConnman::ReleaseNodeVector(const std::vector<CNode*>& vecNodes)
{
LOCK(cs_vNodes);
for(CNode* pnode : vecNodes) {
pnode->Release();
}
}
3 changes: 0 additions & 3 deletions src/net.h
Expand Up @@ -221,9 +221,6 @@ class CConnman
post();
};

std::vector<CNode*> CopyNodeVector();
void ReleaseNodeVector(const std::vector<CNode*>& vecNodes);

void RelayTransaction(const CTransaction& tx);
void RelayTransaction(const CTransaction& tx, const CDataStream& ss);
void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll = false);
Expand Down

0 comments on commit e733939

Please sign in to comment.