Page MenuHomePhabricator

Remove redundant addrman time checks
ClosedPublic

Authored by PiRK on Jan 5 2024, 10:51.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4030b963f17e: Remove redundant addrman time checks
Summary

Remove redundant nTime checks

nTime is always initialized on deserialization or default-initialized
with TIME_INIT, so special casing 0 does not make sense.

Remove redundant nLastTry check

All other places calculate "now - nLastTry", which is safe and correct
to do when nLastTry is 0. So do the same here.

This is a backport of core#25303

Depends on D15088

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable