aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2016-05-20 16:19:26 +0000
committerGregory Maxwell <greg@xiph.org>2016-05-25 18:05:58 +0000
commit7e908c7b826cedbf29560ce7a668af809ee71524 (patch)
treeb28d1f37652e06bde2db6127cbb3378ee35c7617 /src/net.h
parent8844ef15ded02d5ed86fb95aaf251235fcef2396 (diff)
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.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 998ee49260..66cc912a52 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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;