@@ -1453,7 +1453,7 @@ bool static AlreadyHave(const CInv& inv, const CTxMemPool& mempool) EXCLUSIVE_LO
14531453 if (g_recent_confirmed_transactions->contains (inv.hash )) return true ;
14541454 }
14551455
1456- return recentRejects->contains (inv.hash ) || mempool.exists (inv. hash , inv. IsMsgWtx ( ));
1456+ return recentRejects->contains (inv.hash ) || mempool.exists (ToGenTxid (inv ));
14571457 }
14581458 case MSG_BLOCK:
14591459 case MSG_WITNESS_BLOCK:
@@ -1673,7 +1673,7 @@ void static ProcessGetBlockData(CNode& pfrom, const CChainParams& chainparams, c
16731673// ! Determine whether or not a peer can request a transaction, and return it (or nullptr if not found or not allowed).
16741674CTransactionRef static FindTxForGetData (const CNode& peer, const GenTxid& gtxid, const std::chrono::seconds mempool_req, const std::chrono::seconds now) LOCKS_EXCLUDED(cs_main)
16751675{
1676- auto txinfo = mempool.info (gtxid. GetHash (), gtxid. IsWtxid () );
1676+ auto txinfo = mempool.info (gtxid);
16771677 if (txinfo.tx ) {
16781678 // If a TX could have been INVed in reply to a MEMPOOL request,
16791679 // or is older than UNCONDITIONAL_RELAY_DELAY, permit the request
@@ -4358,14 +4358,15 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
43584358 std::set<uint256>::iterator it = vInvTx.back ();
43594359 vInvTx.pop_back ();
43604360 uint256 hash = *it;
4361+ CInv inv (state.m_wtxid_relay ? MSG_WTX : MSG_TX, hash);
43614362 // Remove it from the to-be-sent set
43624363 pto->m_tx_relay ->setInventoryTxToSend .erase (it);
43634364 // Check if not in the filter already
43644365 if (pto->m_tx_relay ->filterInventoryKnown .contains (hash)) {
43654366 continue ;
43664367 }
43674368 // Not in the mempool anymore? don't bother sending it.
4368- auto txinfo = m_mempool.info (hash, state. m_wtxid_relay );
4369+ auto txinfo = m_mempool.info (ToGenTxid (inv) );
43694370 if (!txinfo.tx ) {
43704371 continue ;
43714372 }
@@ -4378,7 +4379,7 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
43784379 if (pto->m_tx_relay ->pfilter && !pto->m_tx_relay ->pfilter ->IsRelevantAndUpdate (*txinfo.tx )) continue ;
43794380 // Send
43804381 State (pto->GetId ())->m_recently_announced_invs .insert (hash);
4381- vInv.push_back (CInv (state. m_wtxid_relay ? MSG_WTX : MSG_TX, hash) );
4382+ vInv.push_back (inv );
43824383 nRelayedTransactions++;
43834384 {
43844385 // Expire old relay messages
0 commit comments