From c85f0d4fdaafd71f922bb94355786543384e4ea0 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Thu, 9 May 2024 10:17:08 +0200 Subject: [PATCH] discount: implement net processing --- src/net_processing.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index b7dc6da0fb..8f62280b6a 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4964,7 +4964,9 @@ bool PeerManagerImpl::SendMessages(CNode* pto) auto txid = txinfo.tx->GetHash(); auto wtxid = txinfo.tx->GetWitnessHash(); // Peer told you to not send transactions at that feerate? Don't bother sending it. - if (txinfo.fee < filterrate.GetFee(txinfo.vsize)) { + // ELEMENTS: use the discounted vsize here so that discounted CTs are relayed. + // discountvsize only differs from vsize if accept_discount_ct is true. + if (txinfo.fee < filterrate.GetFee(txinfo.discountvsize)) { continue; } if (pto->m_tx_relay->pfilter && !pto->m_tx_relay->pfilter->IsRelevantAndUpdate(*txinfo.tx)) continue;