HomePhabricator

[avalanche] Move the last poll time out of the node state

Description

[avalanche] Move the last poll time out of the node state

Summary:
Node state is intended to store validation related data that needs to be gated by cs_main. This not the case for the last poll time which is a network only data, so this is causing a cs_main locking for no benefit.

This diff move the last_poll attribute to the CNode itself. This doesn't require a lock as it's only accessed from the net thread.

There is no change in behavior.

Depends on D14548.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Sep 27 2023, 14:47
FabienPushed on Sep 28 2023, 09:39
Reviewer
Restricted Project
Differential Revision
D14549: [avalanche] Move the last poll time out of the node state
Parents
rABC1510c118a533: [avalanche] Add coverage for the cooldown feature
Branches
Unknown
Tags
Unknown