Skip to content

Commit 34a90e6

Browse files
committed
chore: remove unused IsInvInFilter from PeerManager interface
dash#6425 moved AskNodesForLockedTx to PeerManager as AskPeersForTransaction, which removed the only usage of IsInvInFilter. We can safely remove it from the PeerManager interface as its usage is now purely internal.
1 parent f3224ae commit 34a90e6

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ class PeerManagerImpl final : public PeerManager
645645
void RequestObject(NodeId nodeid, const CInv& inv, std::chrono::microseconds current_time,
646646
bool is_masternode, bool fForce = false) override EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
647647
size_t GetRequestedObjectCount(NodeId nodeid) const override EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
648-
bool IsInvInFilter(NodeId nodeid, const uint256& hash) const override EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
649648
void AskPeersForTransaction(const uint256& txid, bool is_masternode) override EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex);
650649
private:
651650
void _RelayTransaction(const uint256& txid) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
@@ -2317,14 +2316,6 @@ void PeerManagerImpl::AskPeersForTransaction(const uint256& txid, bool is_master
23172316
}
23182317
}
23192318

2320-
bool PeerManagerImpl::IsInvInFilter(NodeId nodeid, const uint256& hash) const
2321-
{
2322-
PeerRef peer = GetPeerRef(nodeid);
2323-
if (peer == nullptr)
2324-
return false;
2325-
return IsInvInFilter(*peer, hash);
2326-
}
2327-
23282319
bool PeerManagerImpl::IsInvInFilter(const Peer& peer, const uint256& hash) const
23292320
{
23302321
if (auto tx_relay = peer.GetTxRelay(); tx_relay != nullptr) {

src/net_processing.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ class PeerManager : public CValidationInterface, public NetEventsInterface
8585
/** Send ping message to all peers */
8686
virtual void SendPings() = 0;
8787

88-
/** Is an inventory in the known inventory filter. Used by InstantSend. */
89-
virtual bool IsInvInFilter(NodeId nodeid, const uint256& hash) const = 0;
90-
9188
/** Ask a number of our peers, which have a transaction in their inventory, for the transaction. */
9289
virtual void AskPeersForTransaction(const uint256& txid, bool is_masternode) = 0;
9390

0 commit comments

Comments
 (0)