diff options
author | John Newbery <john@johnnewbery.com> | 2021-02-12 10:01:55 +0000 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-02-15 16:02:43 +0000 |
commit | 1a07600b4b0d08cffc7cd5c58af33fcd1ede558e (patch) | |
tree | d709d6d3dd0a8dd792ae78650d498a7f860b8b9e /src/net.h | |
parent | f8b3058992b507f3a6aac9d4e2db00102ae1b197 (diff) |
[net] Add RunInactivityChecks()
Moves the logic to prevent running inactivity checks until
the peer has been connected for -peertimeout time into its
own function. This will be reused by net_processing later.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1022,6 +1022,9 @@ 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; + private: struct ListenSocket { public: |