aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-09-01 17:40:32 +0200
committerJon Atack <jon@atack.com>2020-09-01 17:46:28 +0200
commitd780293e1ee0f9e66bd2d88914694c17f9aaa0ca (patch)
tree714450bc6ac2a180771d73f30a83acc4355b7683 /src/net.h
parentbab4cce1b0eedc1a51692aaf83ba54dd0a9d17e6 (diff)
downloadbitcoin-d780293e1ee0f9e66bd2d88914694c17f9aaa0ca.tar.xz
net: improve nLastBlockTime and nLastTXTime documentation
Co-authored-by: John Newbery <john@johnnewbery.com>
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h11
1 files changed, 10 insertions, 1 deletions
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<uint256> 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<int64_t> 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<int64_t> nLastTXTime{0};
// Ping time measurement: