The ability to GETDATA a transaction which has not (yet) been relayed is a privacy loss vector.
The use of the mempool for this was added as part of the mempool p2p message and is only needed to fetch transactions returned by it.
The ability to GETDATA a transaction which has not (yet) been relayed is a privacy loss vector.
The use of the mempool for this was added as part of the mempool p2p message and is only needed to fetch transactions returned by it.
4502@@ -4503,9 +4503,12 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
4503 }
4504 if (!pushed && inv.type == MSG_TX) {
4505 CTransaction tx;
4506- if (mempool.lookup(inv.hash, tx)) {
4507- pfrom->PushMessage(NetMsgType::TX, tx);
4508- pushed = true;
4509+ int64_t txtime;
4510+ if (mempool.lookup(inv.hash, tx, txtime)) {
4511+ if (txtime <= pfrom->timeLastMempool) {
if (mempool.lookup(inv.hash, tx, textile) && txtime <= pfrom->timeLastMempool) {
also work?
413@@ -413,6 +414,8 @@ class CNode
414 // Used for BIP35 mempool sending, also protected by cs_inventory
415 bool fSendMempool;
416
417+ // Last time a mempool
797@@ -798,6 +798,16 @@ bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
798 return true;
799 }
800
801+bool CTxMemPool::lookup(uint256 hash, CTransaction& result, int64_t& time) const
int64_t& time
to the previous lookup
? Both functions are almost the same…
The ability to GETDATA a transaction which has not (yet) been relayed
is a privacy loss vector.
The use of the mempool for this was added as part of the mempool p2p
message and is only needed to fetch transactions returned by it.