aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-07-19 10:45:32 +0100
committerJohn Newbery <john@johnnewbery.com>2021-08-05 17:10:32 +0100
commit10aac241455a3270462d49b53732477ed97623e7 (patch)
treeeb41cb0493ae0fd01777c2cf424b326a8a691d6a /src/addrman.h
parentfa9710f62c29c7f8d71c9f281001c9b5e70946bf (diff)
downloadbitcoin-10aac241455a3270462d49b53732477ed97623e7.tar.xz
[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.
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 2503f53a35..2c6ffbe523 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -497,7 +497,7 @@ public:
: insecure_rand{deterministic}
{
Clear();
- if (deterministic) nKey.SetNull();
+ if (deterministic) nKey = uint256{1};
}
~CAddrMan()