From 077bdca2a8150c7b2edb74b913016a9d6b2f24d5 Mon Sep 17 00:00:00 2001 From: Dakoda Greaves Date: Fri, 22 Mar 2024 19:13:34 -0700 Subject: [PATCH] asmap: fix addrman tests by renaming asmap to asmap_raw --- src/test/addrman_tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 861f6114fb8..62bc190e37c 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -613,7 +613,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket) uint256 nKey1 = (uint256)(CHashWriter(SER_GETHASH, 0) << 1).GetHash(); uint256 nKey2 = (uint256)(CHashWriter(SER_GETHASH, 0) << 2).GetHash(); - std::vector asmap1 = FromBytes(asmap, sizeof(asmap) * 8); + std::vector asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8); BOOST_CHECK_EQUAL(info1.GetTriedBucket(nKey1, asmap1), 236); @@ -670,7 +670,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket) uint256 nKey1 = (uint256)(CHashWriter(SER_GETHASH, 0) << 1).GetHash(); uint256 nKey2 = (uint256)(CHashWriter(SER_GETHASH, 0) << 2).GetHash(); - std::vector asmap1 = FromBytes(asmap, sizeof(asmap) * 8); + std::vector asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8); // Test: Make sure the buckets are what we expect BOOST_CHECK_EQUAL(info1.GetNewBucket(nKey1, asmap1), 795); @@ -738,7 +738,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket) BOOST_AUTO_TEST_CASE(addrman_serialization) { - std::vector asmap1 = FromBytes(asmap, sizeof(asmap) * 8); + std::vector asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8); CAddrManTest addrman_asmap1(true, asmap1); CAddrManTest addrman_asmap1_dup(true, asmap1);