We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60f0acd commit 08b3995Copy full SHA for 08b3995
src/net_processing.cpp
@@ -4246,6 +4246,11 @@ bool PeerLogicValidation::SendMessages(CNode* pto)
4246
if (ret.second) {
4247
vRelayExpiration.push_back(std::make_pair(nNow + std::chrono::microseconds{RELAY_TX_CACHE_TIME}.count(), ret.first));
4248
}
4249
+ // Add wtxid-based lookup into mapRelay as well, so that peers can request by wtxid
4250
+ auto ret2 = mapRelay.emplace(ret.first->second->GetWitnessHash(), ret.first->second);
4251
+ if (ret2.second) {
4252
+ vRelayExpiration.emplace_back(nNow + std::chrono::microseconds{RELAY_TX_CACHE_TIME}.count(), ret2.first);
4253
+ }
4254
4255
if (vInv.size() == MAX_INV_SZ) {
4256
connman->PushMessage(pto, msgMaker.Make(NetMsgType::INV, vInv));
0 commit comments