diff options
author | John Newbery <john@johnnewbery.com> | 2021-01-06 11:12:51 +0000 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-01-19 10:50:36 +0000 |
commit | bf100f8170770544fb39ae6802175c564cde532f (patch) | |
tree | 2c006ffa5597e9ddeffcd5ca8667a4458b2407ca /src/bench | |
parent | 06fa85cd50b718fecd69f0481740d2b8714a1397 (diff) |
[net] Cleanup InactivityChecks() and add commenting about time
Also clean up and better comment the function. InactivityChecks() uses a
mixture of (non-mockable) system time and mockable time. Make sure
that's well documented.
Despite being marked as const in CConnman before this commit, the
function did mutate the state of the passed in CNode, which is contained
in vNodes, which is a member of CConnman. To make the function truly
const in CConnman and all its data, instead make InactivityChecks() a
pure function, return whether the peer should be disconnected, and let
the calling function (SocketHandler()) update the CNode object. Also
make the CNode& argument const.
Diffstat (limited to 'src/bench')
0 files changed, 0 insertions, 0 deletions