Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 3,541 Lines • ▼ Show 20 Lines | std::vector<CInv> vInv; | ||||
} | } | ||||
LOCK(pto->cs_filter); | LOCK(pto->cs_filter); | ||||
for (const auto &txinfo : vtxinfo) { | for (const auto &txinfo : vtxinfo) { | ||||
const uint256 &txid = txinfo.tx->GetId(); | const uint256 &txid = txinfo.tx->GetId(); | ||||
CInv inv(MSG_TX, txid); | CInv inv(MSG_TX, txid); | ||||
pto->setInventoryTxToSend.erase(txid); | pto->setInventoryTxToSend.erase(txid); | ||||
if (filterrate != Amount(0)) { | if (filterrate != Amount(0) && | ||||
if (txinfo.feeRate.GetFeePerK() < filterrate) { | txinfo.feeRate.GetFeePerK() < filterrate) { | ||||
continue; | continue; | ||||
} | } | ||||
} | if (pto->pfilter && | ||||
if (pto->pfilter) { | !pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) { | ||||
if (!pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) { | |||||
continue; | continue; | ||||
} | } | ||||
} | |||||
pto->filterInventoryKnown.insert(txid); | pto->filterInventoryKnown.insert(txid); | ||||
vInv.push_back(inv); | vInv.push_back(inv); | ||||
if (vInv.size() == MAX_INV_SZ) { | if (vInv.size() == MAX_INV_SZ) { | ||||
connman.PushMessage(pto, | connman.PushMessage(pto, | ||||
msgMaker.Make(NetMsgType::INV, vInv)); | msgMaker.Make(NetMsgType::INV, vInv)); | ||||
vInv.clear(); | vInv.clear(); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |