[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.
This commit is contained in:
John Newbery
2021-02-12 10:01:55 +00:00
parent f8b3058992
commit 1a07600b4b
2 changed files with 9 additions and 7 deletions

View File

@@ -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: