HomePhabricator

Remove redundant addrman time checks

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Apr 11 2022, 11:37
PiRKCommitted on Jan 5 2024, 14:40
PiRKPushed on Jan 5 2024, 14:40
Reviewer
Restricted Project
Differential Revision
D15089: Remove redundant addrman time checks
Parents
rABC3abdf23772eb: addrman: Fix AddrMan::Add() return semantics and logging
Branches
Unknown
Tags
Unknown