Skip to content

Commit 5be0190

Browse files
committed
Delete some unused (and broken) functions in CConnman
1 parent b68f898 commit 5be0190

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/net.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,24 +2371,6 @@ void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats)
23712371
}
23722372
}
23732373

2374-
bool CConnman::DisconnectAddress(const CNetAddr& netAddr)
2375-
{
2376-
if (CNode* pnode = FindNode(netAddr)) {
2377-
pnode->fDisconnect = true;
2378-
return true;
2379-
}
2380-
return false;
2381-
}
2382-
2383-
bool CConnman::DisconnectSubnet(const CSubNet& subNet)
2384-
{
2385-
if (CNode* pnode = FindNode(subNet)) {
2386-
pnode->fDisconnect = true;
2387-
return true;
2388-
}
2389-
return false;
2390-
}
2391-
23922374
bool CConnman::DisconnectNode(const std::string& strNode)
23932375
{
23942376
if (CNode* pnode = FindNode(strNode)) {
@@ -2409,16 +2391,6 @@ bool CConnman::DisconnectNode(NodeId id)
24092391
return false;
24102392
}
24112393

2412-
void CConnman::RelayTransaction(const CTransaction& tx)
2413-
{
2414-
CInv inv(MSG_TX, tx.GetHash());
2415-
LOCK(cs_vNodes);
2416-
BOOST_FOREACH(CNode* pnode, vNodes)
2417-
{
2418-
pnode->PushInventory(inv);
2419-
}
2420-
}
2421-
24222394
void CConnman::RecordBytesRecv(uint64_t bytes)
24232395
{
24242396
LOCK(cs_totalBytesRecv);

src/net.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ class CConnman
243243
post();
244244
};
245245

246-
void RelayTransaction(const CTransaction& tx);
247-
248246
// Addrman functions
249247
size_t GetAddressCount() const;
250248
void SetServices(const CService &addr, ServiceFlags nServices);
@@ -286,10 +284,8 @@ class CConnman
286284

287285
size_t GetNodeCount(NumConnections num);
288286
void GetNodeStats(std::vector<CNodeStats>& vstats);
289-
bool DisconnectAddress(const CNetAddr& addr);
290287
bool DisconnectNode(const std::string& node);
291288
bool DisconnectNode(NodeId id);
292-
bool DisconnectSubnet(const CSubNet& subnet);
293289

294290
unsigned int GetSendBufferSize() const;
295291

0 commit comments

Comments
 (0)