HomePhabricator

net, rpc: expose nLastBlockTime/nLastTXTime as last block/last_transaction in…

Description

net, rpc: expose nLastBlockTime/nLastTXTime as last block/last_transaction in getpeerinfo

Summary:

This PR adds inbound peer eviction criteria nLastBlockTime and
nLastTXTime to CNodeStats and CNode::copyStats, which then allows
exposing them in the next commit as last_transaction and last_block Unix
Epoch Time fields in RPC getpeerinfo.

Backport of core#19731.

Depends on D9324 and D9330.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Jon Atack <jon@atack.com>Authored on Aug 9 2020, 19:49
FabienCommitted on Mar 22 2021, 09:05
FabienPushed on Mar 22 2021, 09:07
Reviewer
Restricted Project
Differential Revision
D9331: net, rpc: expose nLastBlockTime/nLastTXTime as last block/last_transaction in getpeerinfo
Parents
rABC53281306280f: p2p: Reduce inv traffic during IBD
Branches
Unknown
Tags
Unknown