Page MenuHomePhabricator

[init] Read/decode asmap before constructing addrman
ClosedPublic

Authored by Fabien on Oct 18 2022, 13:05.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC98906036effb: [init] Read/decode asmap before constructing addrman
Summary
Commit 181a1207 introduced an initialization order bug: CAddrMan's m_asmap must be set before deserializing peers.dat. Restore that ordering.

Note that we didn't introduce the bug (yet), mostly because most of the referenced PR is not relevant for us so it has been purposedly delayed. A note is added to the code so that later backport will not introduce more issues.

Partial backport of core#22791:
https://github.com/bitcoin/bitcoin/pull/22791/commits/50fd77045e2f858a53486b5e02e1798c92ab946c

Test Plan
ninja all check-all

Diff Detail

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