HomePhabricator

[tests] Make deterministic addrman use nKey = 1

Description

[tests] Make deterministic addrman use nKey = 1

Summary:

addrman_tests fail when consistency checks are enabled, since the tests set the deterministic test addrman's nKey value to zero, which is an invalid value. Change this so that deterministic addrman's nKey value is set to 1.

This requires updating a few tests that are using magic values derived from nKey being set to 0.

Partial backport of core#20233:
https://github.com/bitcoin/bitcoin/pull/20233/commits/10aac241455a3270462d49b53732477ed97623e7

Depends on D12270.

Test Plan:
With DEBUG_ADDRMAN:

ninja all check

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Oct 17 2022, 10:09
FabienPushed on Oct 17 2022, 14:30
Reviewer
Restricted Project
Differential Revision
D12271: [tests] Make deterministic addrman use nKey = 1
Parents
rABCffb9f52db916: Add missing const to CAddrMan::Check_()
Branches
Unknown
Tags
Unknown