[tests] Make deterministic addrman use nKey = 1

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.
This commit is contained in:
John Newbery
2021-07-19 10:45:32 +01:00
parent fa9710f62c
commit 10aac24145
2 changed files with 52 additions and 46 deletions

View File

@@ -497,7 +497,7 @@ public:
: insecure_rand{deterministic}
{
Clear();
if (deterministic) nKey.SetNull();
if (deterministic) nKey = uint256{1};
}
~CAddrMan()