Skip to content

Commit

Permalink
asmap: fix addrman tests by renaming asmap to asmap_raw
Browse files Browse the repository at this point in the history
  • Loading branch information
xanimo committed Mar 23, 2024
1 parent 2a7ccd3 commit ad222e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/addrman_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> asmap1 = FromBytes(asmap, sizeof(asmap) * 8);
std::vector<bool> asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8);

BOOST_CHECK_EQUAL(info1.GetTriedBucket(nKey1, asmap1), 236);

Expand Down Expand Up @@ -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<bool> asmap1 = FromBytes(asmap, sizeof(asmap) * 8);
std::vector<bool> 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);
Expand Down Expand Up @@ -738,7 +738,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)

BOOST_AUTO_TEST_CASE(addrman_serialization)
{
std::vector<bool> asmap1 = FromBytes(asmap, sizeof(asmap) * 8);
std::vector<bool> asmap1 = FromBytes(asmap_raw, sizeof(asmap_raw) * 8);

CAddrManTest addrman_asmap1(true, asmap1);
CAddrManTest addrman_asmap1_dup(true, asmap1);
Expand Down

0 comments on commit ad222e0

Please sign in to comment.