HomePhabricator

[avalanche] Track the time of the last new proof received

Description

[avalanche] Track the time of the last new proof received

Summary:
Similar to what is done with blocks and txs, this remembers for each peer the time at which the last new (previously unknown) and valid proof is received.
This time is part of the peer stats and can be retrieved via the getpeerinfo RPC if avalanche is enabled.
The intent is to use that value for the peer eviction logic, but this is not part of this diff.

Depends on D9818.

Ref T1611.

Test Plan:

./test/functional/test_runner.py rpc_net

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Maniphest Tasks: T1611

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

Details

Provenance
FabienAuthored on Tue, Jul 20, 13:15
FabienPushed on Tue, Jul 20, 18:15
Reviewer
Restricted Project
Differential Revision
D9819: [avalanche] Track the time of the last new proof received
Parents
rABC74fec65ca4ce: [avalanche] Fix downloading proofs from peers that just inv'ed us
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task