@@ -440,8 +440,8 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket_legacy)
440440
441441 AddrInfo info1 = AddrInfo (addr1, source1);
442442
443- uint256 nKey1 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 1 ).GetHash ();
444- uint256 nKey2 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 2 ).GetHash ();
443+ uint256 nKey1 = (HashWriter{} << 1 ).GetHash ();
444+ uint256 nKey2 = (HashWriter{} << 2 ).GetHash ();
445445
446446 BOOST_CHECK_EQUAL (info1.GetTriedBucket (nKey1, EMPTY_NETGROUPMAN), 40 );
447447
@@ -490,8 +490,8 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket_legacy)
490490
491491 AddrInfo info1 = AddrInfo (addr1, source1);
492492
493- uint256 nKey1 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 1 ).GetHash ();
494- uint256 nKey2 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 2 ).GetHash ();
493+ uint256 nKey1 = (HashWriter{} << 1 ).GetHash ();
494+ uint256 nKey2 = (HashWriter{} << 2 ).GetHash ();
495495
496496 // Test: Make sure the buckets are what we expect
497497 BOOST_CHECK_EQUAL (info1.GetNewBucket (nKey1, EMPTY_NETGROUPMAN), 786 );
@@ -568,8 +568,8 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket)
568568
569569 AddrInfo info1 = AddrInfo (addr1, source1);
570570
571- uint256 nKey1 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 1 ).GetHash ();
572- uint256 nKey2 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 2 ).GetHash ();
571+ uint256 nKey1 = (HashWriter{} << 1 ).GetHash ();
572+ uint256 nKey2 = (HashWriter{} << 2 ).GetHash ();
573573
574574 BOOST_CHECK_EQUAL (info1.GetTriedBucket (nKey1, ngm_asmap), 236 );
575575
@@ -621,8 +621,8 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)
621621
622622 AddrInfo info1 = AddrInfo (addr1, source1);
623623
624- uint256 nKey1 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 1 ).GetHash ();
625- uint256 nKey2 = (uint256)( CHashWriter (SER_GETHASH, 0 ) << 2 ).GetHash ();
624+ uint256 nKey1 = (HashWriter{} << 1 ).GetHash ();
625+ uint256 nKey2 = (HashWriter{} << 2 ).GetHash ();
626626
627627 // Test: Make sure the buckets are what we expect
628628 BOOST_CHECK_EQUAL (info1.GetNewBucket (nKey1, ngm_asmap), 795 );
0 commit comments