HomePhabricator

[net] Add RunInactivityChecks()

Description

[net] Add RunInactivityChecks()

Summary:

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.

Partial backport of core#20721:
https://github.com/bitcoin/bitcoin/pull/20721/commits/1a07600b4b0d08cffc7cd5c58af33fcd1ede558e

Depends on D10873.

Ref T1696.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1696

Differential Revision: https://reviews.bitcoinabc.org/D10875

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Feb 12 2021, 10:01
FabienCommitted on Jan 25 2022, 16:38
FabienPushed on Jan 25 2022, 16:38
Reviewer
Restricted Project
Differential Revision
D10875: [net] Add RunInactivityChecks()
Parents
rABCa021be3353aa: [net processing] Add Peer& arg to MaybeDiscourageAndDisconnect()
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task

Event Timeline

Fabien added a task: Restricted Maniphest Task.