aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-02-16 15:55:03 +0000
committerJohn Newbery <john@johnnewbery.com>2021-04-01 11:35:27 +0100
commit5ed535a02f8f0a6f65bbe19f48a8c81f43298393 (patch)
tree31e10f4a24bb2efbb1b94abba82bb43c9a37e5e8 /src/net.h
parent2b2ab9ab7895cd6356e5dc4db17aa9ce475d495e (diff)
[net] Changes to RunInactivityChecks
- rename to ShouldRunInactivityChecks (https://github.com/bitcoin/bitcoin/pull/20721#discussion_r576394790) - take optional time now (https://github.com/bitcoin/bitcoin/pull/20721#discussion_r575895661) - call from within InactivityChecks (https://github.com/bitcoin/bitcoin/pull/20721#discussion_r575894665) - update comment (https://github.com/bitcoin/bitcoin/pull/20721#discussion_r575894343) - change ordering of inequality (https://github.com/bitcoin/bitcoin/pull/20721#discussion_r574925129)
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.h b/src/net.h
index cae22969ce..13f86b6a91 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1018,8 +1018,8 @@ public:
void SetAsmap(std::vector<bool> asmap) { addrman.m_asmap = std::move(asmap); }
- /** Return true if the peer has been connected for long enough to do inactivity checks. */
- bool RunInactivityChecks(const CNode& node) const;
+ /** Return true if we should disconnect the peer for failing an inactivity check. */
+ bool ShouldRunInactivityChecks(const CNode& node, std::optional<int64_t> now=std::nullopt) const;
private:
struct ListenSocket {