From d780293e1ee0f9e66bd2d88914694c17f9aaa0ca Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Tue, 1 Sep 2020 17:40:32 +0200 Subject: net: improve nLastBlockTime and nLastTXTime documentation Co-authored-by: John Newbery --- src/net.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index c72eada3ff..0b5ab2390e 100644 --- a/src/net.h +++ b/src/net.h @@ -932,8 +932,17 @@ public: // Used for headers announcements - unfiltered blocks to relay std::vector vBlockHashesToAnnounce GUARDED_BY(cs_inventory); - // Block and TXN accept times + /** UNIX epoch time of the last block received from this peer that we had + * not yet seen (e.g. not already received from another peer), that passed + * preliminary validity checks and was saved to disk, even if we don't + * connect the block or it eventually fails connection. Used as an inbound + * peer eviction criterium in CConnman::AttemptToEvictConnection. */ std::atomic nLastBlockTime{0}; + + /** UNIX epoch time of the last transaction received from this peer that we + * had not yet seen (e.g. not already received from another peer) and that + * was accepted into our mempool. Used as an inbound peer eviction criterium + * in CConnman::AttemptToEvictConnection. */ std::atomic nLastTXTime{0}; // Ping time measurement: -- cgit v1.2.3