HomePhabricator

refactor: Pass reference to last header, not pointer

Description

refactor: Pass reference to last header, not pointer

Summary:
It is never a nullptr, otherwise an assertion would fire in
UpdatePeerStateForReceivedHeaders.

Passing a reference makes the code easier to read and less brittle.

This is a backport of core#26378

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MacroFake <falke.marco@gmail.com>Authored on Jul 6 2022, 15:22
PiRKCommitted on Sep 30 2024, 10:36
PiRKPushed on Sep 30 2024, 10:36
Reviewer
Restricted Project
Differential Revision
D16817: refactor: Pass reference to last header, not pointer
Parents
rABCf3f9586e12b3: addrman: Use system time instead of adjusted network time
Branches
Unknown
Tags
Unknown