aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2016-05-22 05:55:15 +0000
committerGregory Maxwell <greg@xiph.org>2016-06-15 20:19:07 +0000
commit5d0ca81f7422b7eac0a5129c6fbccad77e36b85d (patch)
treee8ed6f0511a9b837e047b5343f7fabf7ca2f3592 /src/net.h
parent32b7294177e50cba8aa26ae0689d4b24f3c10df3 (diff)
downloadbitcoin-5d0ca81f7422b7eac0a5129c6fbccad77e36b85d.tar.xz
Add recently accepted blocks and txn to AttemptToEvictConnection.
This protects any not-already-protected peers who were the most recent four to relay transactions and most recent four to send blocks to us.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 5c1f7e3e89..2f96c58e30 100644
--- a/src/net.h
+++ b/src/net.h
@@ -416,6 +416,11 @@ public:
// Last time a "MEMPOOL" request was serviced.
std::atomic<int64_t> timeLastMempoolReq;
+
+ // Block and TXN accept times
+ std::atomic<int64_t> nLastBlockTime;
+ std::atomic<int64_t> nLastTXTime;
+
// Ping time measurement:
// The pong reply we're expecting, or 0 if no pong expected.
uint64_t nPingNonceSent;