@@ -39,9 +39,9 @@ void TxDownloadManager::DisconnectedPeer(NodeId nodeid)
39
39
{
40
40
m_impl->DisconnectedPeer (nodeid);
41
41
}
42
- bool TxDownloadManager::AddTxAnnouncement (NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now, bool p2p_inv )
42
+ bool TxDownloadManager::AddTxAnnouncement (NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now)
43
43
{
44
- return m_impl->AddTxAnnouncement (peer, gtxid, now, p2p_inv );
44
+ return m_impl->AddTxAnnouncement (peer, gtxid, now);
45
45
}
46
46
std::vector<GenTxid> TxDownloadManager::GetRequestsToSend (NodeId nodeid, std::chrono::microseconds current_time)
47
47
{
@@ -172,14 +172,13 @@ void TxDownloadManagerImpl::DisconnectedPeer(NodeId nodeid)
172
172
173
173
}
174
174
175
- bool TxDownloadManagerImpl::AddTxAnnouncement (NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now, bool p2p_inv )
175
+ bool TxDownloadManagerImpl::AddTxAnnouncement (NodeId peer, const GenTxid& gtxid, std::chrono::microseconds now)
176
176
{
177
177
// If this is an orphan we are trying to resolve, consider this peer as a orphan resolution candidate instead.
178
- // - received as an p2p inv
179
178
// - is wtxid matching something in orphanage
180
179
// - exists in orphanage
181
180
// - peer can be an orphan resolution candidate
182
- if (p2p_inv && gtxid.IsWtxid ()) {
181
+ if (gtxid.IsWtxid ()) {
183
182
if (auto orphan_tx{m_orphanage.GetTx (Wtxid::FromUint256 (gtxid.GetHash ()))}) {
184
183
auto unique_parents{GetUniqueParents (*orphan_tx)};
185
184
std::erase_if (unique_parents, [&](const auto & txid){
@@ -205,7 +204,7 @@ bool TxDownloadManagerImpl::AddTxAnnouncement(NodeId peer, const GenTxid& gtxid,
205
204
}
206
205
207
206
// If this is an inv received from a peer and we already have it, we can drop it.
208
- if (p2p_inv && AlreadyHaveTx (gtxid, /* include_reconsiderable=*/ true )) return true ;
207
+ if (AlreadyHaveTx (gtxid, /* include_reconsiderable=*/ true )) return true ;
209
208
210
209
auto it = m_peer_info.find (peer);
211
210
if (it == m_peer_info.end ()) return false ;
0 commit comments