HomePhabricator

[addrman] Move peers.dat parsing to init.cpp

Description

[addrman] Move peers.dat parsing to init.cpp

Summary:
Backport of core#22697.

Only these commits are interesting:
https://github.com/bitcoin/bitcoin/pull/22697/commits/181a1207ba6bd179d181f3e2534ef8676565ce72
https://github.com/bitcoin/bitcoin/pull/22697/commits/e8e7392311edf44278d76743bebe902d4ac94662

Removing the Clear() method would be interesting but it prevents use from being able to make the CConnman's CAddrMan deterministic and we need this for testing, so we skip that part.

Because we already backported PR22791 (see D12294), no ordering bug is introduced here.

Depends on D12300.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

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

Details

Provenance
John Newbery <john@johnnewbery.com>Authored on Aug 5 2021, 10:09
FabienCommitted on Oct 19 2022, 12:29
FabienPushed on Oct 19 2022, 12:29
Reviewer
Restricted Project
Differential Revision
D12302: [addrman] Move peers.dat parsing to init.cpp
Parents
rABCbe0f1881ef12: validation: don't modify genesis during snapshot load
Branches
Unknown
Tags
Unknown