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.
This commit is contained in:
Gregory Maxwell
2016-05-22 05:55:15 +00:00
committed by lateminer
parent 8f3520e4c5
commit 35c0e679b7
4 changed files with 61 additions and 10 deletions

View File

@@ -421,6 +421,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;