Skip to content

Commit fa00447

Browse files
author
MarcoFalke
committed
scripted-diff: Use clang-tidy syntax for C++ named arguments
-BEGIN VERIFY SCRIPT- perl -0777 -pi -e 's:((\(|\{|,)(\n| )*)\/\* ?([^=* ]+) ?\*\/ ?:\1/*\4=*/:g' $( git ls-files ./src/test ./src/wallet/test ) -END VERIFY SCRIPT-
1 parent fae13c3 commit fa00447

29 files changed

+165
-165
lines changed

src/test/addrman_tests.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AddrManTest : public AddrMan
2626
{
2727
public:
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
}

src/test/coins_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
269269
CCoinsViewTest base;
270270
SimulationTest(&base, false);
271271

272-
CCoinsViewDB db_base{"test", /*nCacheSize*/ 1 << 23, /*fMemory*/ true, /*fWipe*/ false};
272+
CCoinsViewDB db_base{"test", /*nCacheSize=*/1 << 23, /*fMemory=*/true, /*fWipe=*/false};
273273
SimulationTest(&db_base, true);
274274
}
275275

src/test/denialofservice_tests.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
213213

214214
banman->ClearBanned();
215215
nodes[0] = new CNode{id++, NODE_NETWORK, INVALID_SOCKET, addr[0], /*nKeyedNetGroupIn=*/0,
216-
/*nLocalHostNonceIn */ 0, CAddress(), /*addrNameIn=*/"",
216+
/*nLocalHostNonceIn=*/0, CAddress(), /*addrNameIn=*/"",
217217
ConnectionType::INBOUND, /*inbound_onion=*/false};
218218
nodes[0]->SetCommonVersion(PROTOCOL_VERSION);
219219
peerLogic->InitializeNode(nodes[0]);
220220
nodes[0]->fSuccessfullyConnected = true;
221221
connman->AddTestNode(*nodes[0]);
222-
peerLogic->Misbehaving(nodes[0]->GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ ""); // Should be discouraged
222+
peerLogic->Misbehaving(nodes[0]->GetId(), DISCOURAGEMENT_THRESHOLD, /*message=*/""); // Should be discouraged
223223
{
224224
LOCK(nodes[0]->cs_sendProcessing);
225225
BOOST_CHECK(peerLogic->SendMessages(nodes[0]));
@@ -229,13 +229,13 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
229229
BOOST_CHECK(!banman->IsDiscouraged(other_addr)); // Different address, not discouraged
230230

231231
nodes[1] = new CNode{id++, NODE_NETWORK, INVALID_SOCKET, addr[1], /*nKeyedNetGroupIn=*/1,
232-
/*nLocalHostNonceIn */ 1, CAddress(), /*addrNameIn=*/"",
232+
/*nLocalHostNonceIn=*/1, CAddress(), /*addrNameIn=*/"",
233233
ConnectionType::INBOUND, /*inbound_onion=*/false};
234234
nodes[1]->SetCommonVersion(PROTOCOL_VERSION);
235235
peerLogic->InitializeNode(nodes[1]);
236236
nodes[1]->fSuccessfullyConnected = true;
237237
connman->AddTestNode(*nodes[1]);
238-
peerLogic->Misbehaving(nodes[1]->GetId(), DISCOURAGEMENT_THRESHOLD - 1, /* message */ "");
238+
peerLogic->Misbehaving(nodes[1]->GetId(), DISCOURAGEMENT_THRESHOLD - 1, /*message=*/"");
239239
{
240240
LOCK(nodes[1]->cs_sendProcessing);
241241
BOOST_CHECK(peerLogic->SendMessages(nodes[1]));
@@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
246246
// [1] is not discouraged/disconnected yet.
247247
BOOST_CHECK(!banman->IsDiscouraged(addr[1]));
248248
BOOST_CHECK(!nodes[1]->fDisconnect);
249-
peerLogic->Misbehaving(nodes[1]->GetId(), 1, /* message */ ""); // [1] reaches discouragement threshold
249+
peerLogic->Misbehaving(nodes[1]->GetId(), 1, /*message=*/""); // [1] reaches discouragement threshold
250250
{
251251
LOCK(nodes[1]->cs_sendProcessing);
252252
BOOST_CHECK(peerLogic->SendMessages(nodes[1]));
@@ -260,13 +260,13 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
260260
// Make sure non-IP peers are discouraged and disconnected properly.
261261

262262
nodes[2] = new CNode{id++, NODE_NETWORK, INVALID_SOCKET, addr[2], /*nKeyedNetGroupIn=*/1,
263-
/*nLocalHostNonceIn */ 1, CAddress(), /*addrNameIn=*/"",
263+
/*nLocalHostNonceIn=*/1, CAddress(), /*addrNameIn=*/"",
264264
ConnectionType::OUTBOUND_FULL_RELAY, /*inbound_onion=*/false};
265265
nodes[2]->SetCommonVersion(PROTOCOL_VERSION);
266266
peerLogic->InitializeNode(nodes[2]);
267267
nodes[2]->fSuccessfullyConnected = true;
268268
connman->AddTestNode(*nodes[2]);
269-
peerLogic->Misbehaving(nodes[2]->GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ "");
269+
peerLogic->Misbehaving(nodes[2]->GetId(), DISCOURAGEMENT_THRESHOLD, /*message=*/"");
270270
{
271271
LOCK(nodes[2]->cs_sendProcessing);
272272
BOOST_CHECK(peerLogic->SendMessages(nodes[2]));
@@ -302,7 +302,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
302302
peerLogic->InitializeNode(&dummyNode);
303303
dummyNode.fSuccessfullyConnected = true;
304304

305-
peerLogic->Misbehaving(dummyNode.GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ "");
305+
peerLogic->Misbehaving(dummyNode.GetId(), DISCOURAGEMENT_THRESHOLD, /*message=*/"");
306306
{
307307
LOCK(dummyNode.cs_sendProcessing);
308308
BOOST_CHECK(peerLogic->SendMessages(&dummyNode));
@@ -334,7 +334,7 @@ static void MakeNewKeyWithFastRandomContext(CKey& key)
334334
{
335335
std::vector<unsigned char> keydata;
336336
keydata = g_insecure_rand_ctx.randbytes(32);
337-
key.Set(keydata.data(), keydata.data() + keydata.size(), /*fCompressedIn*/ true);
337+
key.Set(keydata.data(), keydata.data() + keydata.size(), /*fCompressedIn=*/true);
338338
assert(key.IsValid());
339339
}
340340

src/test/fuzz/addrman.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ FUZZ_TARGET_INIT(data_stream_addr_man, initialize_addrman)
2929
{
3030
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
3131
CDataStream data_stream = ConsumeDataStream(fuzzed_data_provider);
32-
AddrMan addr_man(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
32+
AddrMan addr_man(/*asmap=*/std::vector<bool>(), /*deterministic=*/false, /*consistency_check_ratio=*/0);
3333
try {
3434
ReadFromStream(addr_man, data_stream);
3535
} catch (const std::exception&) {
@@ -113,7 +113,7 @@ class AddrManDeterministic : public AddrMan
113113
{
114114
public:
115115
explicit AddrManDeterministic(std::vector<bool> asmap, FuzzedDataProvider& fuzzed_data_provider)
116-
: AddrMan(std::move(asmap), /* deterministic */ true, /* consistency_check_ratio */ 0)
116+
: AddrMan(std::move(asmap), /*deterministic=*/true, /*consistency_check_ratio=*/0)
117117
{
118118
WITH_LOCK(m_impl->cs, m_impl->insecure_rand = FastRandomContext{ConsumeUInt256(fuzzed_data_provider)});
119119
}
@@ -286,9 +286,9 @@ FUZZ_TARGET_INIT(addrman, initialize_addrman)
286286
}
287287
const AddrMan& const_addr_man{addr_man};
288288
(void)const_addr_man.GetAddr(
289-
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
290-
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
291-
/* network */ std::nullopt);
289+
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
290+
/*max_pct=*/fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
291+
/*network=*/std::nullopt);
292292
(void)const_addr_man.Select(fuzzed_data_provider.ConsumeBool());
293293
(void)const_addr_man.size();
294294
CDataStream data_stream(SER_NETWORK, PROTOCOL_VERSION);

src/test/fuzz/banman.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ FUZZ_TARGET_INIT(banman, initialize_banman)
5858
}
5959

6060
{
61-
BanMan ban_man{banlist_file, /* client_interface */ nullptr, /* default_ban_time */ ConsumeBanTimeOffset(fuzzed_data_provider)};
61+
BanMan ban_man{banlist_file, /*client_interface=*/nullptr, /*default_ban_time=*/ConsumeBanTimeOffset(fuzzed_data_provider)};
6262
// The complexity is O(N^2), where N is the input size, because each call
6363
// might call DumpBanlist (or other methods that are at least linear
6464
// complexity of the input size).
@@ -105,7 +105,7 @@ FUZZ_TARGET_INIT(banman, initialize_banman)
105105
SetMockTime(ConsumeTime(fuzzed_data_provider));
106106
banmap_t banmap;
107107
ban_man.GetBanned(banmap);
108-
BanMan ban_man_read{banlist_file, /* client_interface */ nullptr, /* default_ban_time */ 0};
108+
BanMan ban_man_read{banlist_file, /*client_interface=*/nullptr, /*default_ban_time=*/0};
109109
banmap_t banmap_read;
110110
ban_man_read.GetBanned(banmap_read);
111111
assert(banmap == banmap_read);

src/test/fuzz/connman.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
2525
{
2626
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
2727
SetMockTime(ConsumeTime(fuzzed_data_provider));
28-
AddrMan addrman(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
28+
AddrMan addrman(/*asmap=*/std::vector<bool>(), /*deterministic=*/false, /*consistency_check_ratio=*/0);
2929
CConnman connman{fuzzed_data_provider.ConsumeIntegral<uint64_t>(), fuzzed_data_provider.ConsumeIntegral<uint64_t>(), addrman, fuzzed_data_provider.ConsumeBool()};
3030
CNetAddr random_netaddr;
3131
CNode random_node = ConsumeNode(fuzzed_data_provider);
@@ -69,15 +69,15 @@ FUZZ_TARGET_INIT(connman, initialize_connman)
6969
},
7070
[&] {
7171
(void)connman.GetAddresses(
72-
/* max_addresses */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
73-
/* max_pct */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
74-
/* network */ std::nullopt);
72+
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
73+
/*max_pct=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
74+
/*network=*/std::nullopt);
7575
},
7676
[&] {
7777
(void)connman.GetAddresses(
78-
/* requestor */ random_node,
79-
/* max_addresses */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
80-
/* max_pct */ fuzzed_data_provider.ConsumeIntegral<size_t>());
78+
/*requestor=*/random_node,
79+
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
80+
/*max_pct=*/fuzzed_data_provider.ConsumeIntegral<size_t>());
8181
},
8282
[&] {
8383
(void)connman.GetDeterministicRandomizer(fuzzed_data_provider.ConsumeIntegral<uint64_t>());

src/test/fuzz/deserialize.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ FUZZ_TARGET_DESERIALIZE(blockmerkleroot, {
189189
BlockMerkleRoot(block, &mutated);
190190
})
191191
FUZZ_TARGET_DESERIALIZE(addrman_deserialize, {
192-
AddrMan am(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0);
192+
AddrMan am(/*asmap=*/std::vector<bool>(), /*deterministic=*/false, /*consistency_check_ratio=*/0);
193193
DeserializeFromFuzzingInput(buffer, am);
194194
})
195195
FUZZ_TARGET_DESERIALIZE(blockheader_deserialize, {

src/test/fuzz/node_eviction.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ FUZZ_TARGET(node_eviction)
2020
std::vector<NodeEvictionCandidate> eviction_candidates;
2121
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000) {
2222
eviction_candidates.push_back({
23-
/* id */ fuzzed_data_provider.ConsumeIntegral<NodeId>(),
24-
/* nTimeConnected */ fuzzed_data_provider.ConsumeIntegral<int64_t>(),
25-
/* m_min_ping_time */ std::chrono::microseconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
26-
/* nLastBlockTime */ fuzzed_data_provider.ConsumeIntegral<int64_t>(),
27-
/* nLastTXTime */ fuzzed_data_provider.ConsumeIntegral<int64_t>(),
28-
/* fRelevantServices */ fuzzed_data_provider.ConsumeBool(),
29-
/* fRelayTxes */ fuzzed_data_provider.ConsumeBool(),
30-
/* fBloomFilter */ fuzzed_data_provider.ConsumeBool(),
31-
/* nKeyedNetGroup */ fuzzed_data_provider.ConsumeIntegral<uint64_t>(),
32-
/* prefer_evict */ fuzzed_data_provider.ConsumeBool(),
33-
/* m_is_local */ fuzzed_data_provider.ConsumeBool(),
34-
/* m_network */ fuzzed_data_provider.PickValueInArray(ALL_NETWORKS),
23+
/*id=*/fuzzed_data_provider.ConsumeIntegral<NodeId>(),
24+
/*nTimeConnected=*/fuzzed_data_provider.ConsumeIntegral<int64_t>(),
25+
/*m_min_ping_time=*/std::chrono::microseconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
26+
/*nLastBlockTime=*/fuzzed_data_provider.ConsumeIntegral<int64_t>(),
27+
/*nLastTXTime=*/fuzzed_data_provider.ConsumeIntegral<int64_t>(),
28+
/*fRelevantServices=*/fuzzed_data_provider.ConsumeBool(),
29+
/*fRelayTxes=*/fuzzed_data_provider.ConsumeBool(),
30+
/*fBloomFilter=*/fuzzed_data_provider.ConsumeBool(),
31+
/*nKeyedNetGroup=*/fuzzed_data_provider.ConsumeIntegral<uint64_t>(),
32+
/*prefer_evict=*/fuzzed_data_provider.ConsumeBool(),
33+
/*m_is_local=*/fuzzed_data_provider.ConsumeBool(),
34+
/*m_network=*/fuzzed_data_provider.PickValueInArray(ALL_NETWORKS),
3535
});
3636
}
3737
// Make a copy since eviction_candidates may be in some valid but otherwise

src/test/fuzz/policy_estimator.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ FUZZ_TARGET_INIT(policy_estimator, initialize_policy_estimator)
3535
const CTransaction tx{*mtx};
3636
block_policy_estimator.processTransaction(ConsumeTxMemPoolEntry(fuzzed_data_provider, tx), fuzzed_data_provider.ConsumeBool());
3737
if (fuzzed_data_provider.ConsumeBool()) {
38-
(void)block_policy_estimator.removeTx(tx.GetHash(), /* inBlock */ fuzzed_data_provider.ConsumeBool());
38+
(void)block_policy_estimator.removeTx(tx.GetHash(), /*inBlock=*/fuzzed_data_provider.ConsumeBool());
3939
}
4040
},
4141
[&] {
@@ -56,7 +56,7 @@ FUZZ_TARGET_INIT(policy_estimator, initialize_policy_estimator)
5656
block_policy_estimator.processBlock(fuzzed_data_provider.ConsumeIntegral<unsigned int>(), ptrs);
5757
},
5858
[&] {
59-
(void)block_policy_estimator.removeTx(ConsumeUInt256(fuzzed_data_provider), /* inBlock */ fuzzed_data_provider.ConsumeBool());
59+
(void)block_policy_estimator.removeTx(ConsumeUInt256(fuzzed_data_provider), /*inBlock=*/fuzzed_data_provider.ConsumeBool());
6060
},
6161
[&] {
6262
block_policy_estimator.FlushUnconfirmed();

src/test/fuzz/process_message.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void fuzz_target(FuzzBufferType buffer, const std::string& LIMIT_TO_MESSAGE_TYPE
8383
p2p_node.fSuccessfullyConnected = successfully_connected;
8484
connman.AddTestNode(p2p_node);
8585
g_setup->m_node.peerman->InitializeNode(&p2p_node);
86-
FillNode(fuzzed_data_provider, p2p_node, /* init_version */ successfully_connected);
86+
FillNode(fuzzed_data_provider, p2p_node, /*init_version=*/successfully_connected);
8787

8888
const auto mock_time = ConsumeTime(fuzzed_data_provider);
8989
SetMockTime(mock_time);

src/test/fuzz/process_messages.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages)
5050
p2p_node.fSuccessfullyConnected = successfully_connected;
5151
p2p_node.fPauseSend = false;
5252
g_setup->m_node.peerman->InitializeNode(&p2p_node);
53-
FillNode(fuzzed_data_provider, p2p_node, /* init_version */ successfully_connected);
53+
FillNode(fuzzed_data_provider, p2p_node, /*init_version=*/successfully_connected);
5454

5555
connman.AddTestNode(p2p_node);
5656
}

src/test/fuzz/script.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ FUZZ_TARGET_INIT(script, initialize_script)
164164
const std::string encoded_dest{EncodeDestination(tx_destination_1)};
165165
const UniValue json_dest{DescribeAddress(tx_destination_1)};
166166
Assert(tx_destination_1 == DecodeDestination(encoded_dest));
167-
(void)GetKeyForDestination(/* store */ {}, tx_destination_1);
167+
(void)GetKeyForDestination(/*store=*/{}, tx_destination_1);
168168
const CScript dest{GetScriptForDestination(tx_destination_1)};
169169
const bool valid{IsValidDestination(tx_destination_1)};
170170
Assert(dest.empty() != valid);

src/test/fuzz/script_assets_test_minimizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void test_init()
190190
static ECCVerifyHandle handle;
191191
}
192192

193-
FUZZ_TARGET_INIT_HIDDEN(script_assets_test_minimizer, test_init, /* hidden */ true)
193+
FUZZ_TARGET_INIT_HIDDEN(script_assets_test_minimizer, test_init, /*hidden=*/true)
194194
{
195195
if (buffer.size() < 2 || buffer.back() != '\n' || buffer[buffer.size() - 2] != ',') return;
196196
const std::string str((const char*)buffer.data(), buffer.size() - 2);

0 commit comments

Comments
 (0)