mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Do not use mempool for GETDATA for tx accepted after the last mempool req.
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.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "sync.h"
|
||||
#include "uint256.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <deque>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -413,6 +414,8 @@ public:
|
||||
// Used for BIP35 mempool sending, also protected by cs_inventory
|
||||
bool fSendMempool;
|
||||
|
||||
// Last time a "MEMPOOL" request was serviced.
|
||||
std::atomic<int64_t> timeLastMempoolReq;
|
||||
// Ping time measurement:
|
||||
// The pong reply we're expecting, or 0 if no pong expected.
|
||||
uint64_t nPingNonceSent;
|
||||
|
||||
Reference in New Issue
Block a user