@@ -26,7 +26,7 @@ class AddrManTest : public AddrMan
2626{
2727public:
2828 explicit AddrManTest (std::vector<bool > asmap = std::vector<bool >())
29- : AddrMan(asmap, /* deterministic=*/ true , /* consistency_check_ratio */ 100 )
29+ : AddrMan(asmap, /* deterministic=*/ true , /* consistency_check_ratio= */ 100 )
3030 {}
3131
3232 AddrInfo* Find (const CService& addr)
@@ -376,7 +376,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
376376 // Test: Sanity check, GetAddr should never return anything if addrman
377377 // is empty.
378378 BOOST_CHECK_EQUAL (addrman.size (), 0U );
379- std::vector<CAddress> vAddr1 = addrman.GetAddr (/* max_addresses */ 0 , /* max_pct */ 0 , /* network */ std::nullopt );
379+ std::vector<CAddress> vAddr1 = addrman.GetAddr (/* max_addresses= */ 0 , /* max_pct= */ 0 , /* network= */ std::nullopt );
380380 BOOST_CHECK_EQUAL (vAddr1.size (), 0U );
381381
382382 CAddress addr1 = CAddress (ResolveService (" 250.250.2.1" , 8333 ), NODE_NONE);
@@ -396,15 +396,15 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
396396 BOOST_CHECK (addrman.Add ({addr1, addr3, addr5}, source1));
397397 BOOST_CHECK (addrman.Add ({addr2, addr4}, source2));
398398
399- BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses */ 0 , /* max_pct */ 0 , /* network */ std::nullopt ).size (), 5U );
399+ BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses= */ 0 , /* max_pct= */ 0 , /* network= */ std::nullopt ).size (), 5U );
400400 // Net processing asks for 23% of addresses. 23% of 5 is 1 rounded down.
401- BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses */ 2500 , /* max_pct */ 23 , /* network */ std::nullopt ).size (), 1U );
401+ BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses= */ 2500 , /* max_pct= */ 23 , /* network= */ std::nullopt ).size (), 1U );
402402
403403 // Test: Ensure GetAddr works with new and tried addresses.
404404 addrman.Good (CAddress (addr1, NODE_NONE));
405405 addrman.Good (CAddress (addr2, NODE_NONE));
406- BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses */ 0 , /* max_pct */ 0 , /* network */ std::nullopt ).size (), 5U );
407- BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses */ 2500 , /* max_pct */ 23 , /* network */ std::nullopt ).size (), 1U );
406+ BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses= */ 0 , /* max_pct= */ 0 , /* network= */ std::nullopt ).size (), 5U );
407+ BOOST_CHECK_EQUAL (addrman.GetAddr (/* max_addresses= */ 2500 , /* max_pct= */ 23 , /* network= */ std::nullopt ).size (), 1U );
408408
409409 // Test: Ensure GetAddr still returns 23% when addrman has many addrs.
410410 for (unsigned int i = 1 ; i < (8 * 256 ); i++) {
@@ -419,7 +419,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
419419 if (i % 8 == 0 )
420420 addrman.Good (addr);
421421 }
422- std::vector<CAddress> vAddr = addrman.GetAddr (/* max_addresses */ 2500 , /* max_pct */ 23 , /* network */ std::nullopt );
422+ std::vector<CAddress> vAddr = addrman.GetAddr (/* max_addresses= */ 2500 , /* max_pct= */ 23 , /* network= */ std::nullopt );
423423
424424 size_t percent23 = (addrman.size () * 23 ) / 100 ;
425425 BOOST_CHECK_EQUAL (vAddr.size (), percent23);
@@ -973,7 +973,7 @@ BOOST_AUTO_TEST_CASE(load_addrman)
973973 // Test that the de-serialization does not throw an exception.
974974 CDataStream ssPeers1 = AddrmanToStream (addrman);
975975 bool exceptionThrown = false ;
976- AddrMan addrman1 (/* asmap */ std::vector<bool >(), /* deterministic */ false , /* consistency_check_ratio */ 100 );
976+ AddrMan addrman1 (/* asmap= */ std::vector<bool >(), /* deterministic= */ false , /* consistency_check_ratio= */ 100 );
977977
978978 BOOST_CHECK (addrman1.size () == 0 );
979979 try {
@@ -990,7 +990,7 @@ BOOST_AUTO_TEST_CASE(load_addrman)
990990 // Test that ReadFromStream creates an addrman with the correct number of addrs.
991991 CDataStream ssPeers2 = AddrmanToStream (addrman);
992992
993- AddrMan addrman2 (/* asmap */ std::vector<bool >(), /* deterministic */ false , /* consistency_check_ratio */ 100 );
993+ AddrMan addrman2 (/* asmap= */ std::vector<bool >(), /* deterministic= */ false , /* consistency_check_ratio= */ 100 );
994994 BOOST_CHECK (addrman2.size () == 0 );
995995 ReadFromStream (addrman2, ssPeers2);
996996 BOOST_CHECK (addrman2.size () == 3 );
@@ -1028,7 +1028,7 @@ BOOST_AUTO_TEST_CASE(load_addrman_corrupted)
10281028 // Test that the de-serialization of corrupted peers.dat throws an exception.
10291029 CDataStream ssPeers1 = MakeCorruptPeersDat ();
10301030 bool exceptionThrown = false ;
1031- AddrMan addrman1 (/* asmap */ std::vector<bool >(), /* deterministic */ false , /* consistency_check_ratio */ 100 );
1031+ AddrMan addrman1 (/* asmap= */ std::vector<bool >(), /* deterministic= */ false , /* consistency_check_ratio= */ 100 );
10321032 BOOST_CHECK (addrman1.size () == 0 );
10331033 try {
10341034 unsigned char pchMsgTmp[4 ];
@@ -1044,7 +1044,7 @@ BOOST_AUTO_TEST_CASE(load_addrman_corrupted)
10441044 // Test that ReadFromStream fails if peers.dat is corrupt
10451045 CDataStream ssPeers2 = MakeCorruptPeersDat ();
10461046
1047- AddrMan addrman2 (/* asmap */ std::vector<bool >(), /* deterministic */ false , /* consistency_check_ratio */ 100 );
1047+ AddrMan addrman2 (/* asmap= */ std::vector<bool >(), /* deterministic= */ false , /* consistency_check_ratio= */ 100 );
10481048 BOOST_CHECK (addrman2.size () == 0 );
10491049 BOOST_CHECK_THROW (ReadFromStream (addrman2, ssPeers2), std::ios_base::failure);
10501050}
0 commit comments