diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-14 16:56:34 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-11-19 12:41:47 +0100 |
commit | fa00447442f22a24e5ca5fc538d0bf7bef575544 (patch) | |
tree | 4c8b89c07de60c29b5fa765be4c96067b0f42a12 /src/test/util | |
parent | fae13c39896898aef2281433af143c22d8b3a3b4 (diff) |
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-
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/chainstate.h | 2 | ||||
-rw-r--r-- | src/test/util/net.cpp | 24 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/test/util/chainstate.h b/src/test/util/chainstate.h index e95573022c..555979d94e 100644 --- a/src/test/util/chainstate.h +++ b/src/test/util/chainstate.h @@ -47,7 +47,7 @@ CreateAndActivateUTXOSnapshot(NodeContext& node, const fs::path root, F malleati malleation(auto_infile, metadata); - return node.chainman->ActivateSnapshot(auto_infile, metadata, /*in_memory*/ true); + return node.chainman->ActivateSnapshot(auto_infile, metadata, /*in_memory=*/true); } diff --git a/src/test/util/net.cpp b/src/test/util/net.cpp index 28d7967078..696fd902f8 100644 --- a/src/test/util/net.cpp +++ b/src/test/util/net.cpp @@ -46,18 +46,18 @@ std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(int n_candida std::vector<NodeEvictionCandidate> candidates; for (int id = 0; id < n_candidates; ++id) { candidates.push_back({ - /* id */ id, - /* nTimeConnected */ static_cast<int64_t>(random_context.randrange(100)), - /* m_min_ping_time */ std::chrono::microseconds{random_context.randrange(100)}, - /* nLastBlockTime */ static_cast<int64_t>(random_context.randrange(100)), - /* nLastTXTime */ static_cast<int64_t>(random_context.randrange(100)), - /* fRelevantServices */ random_context.randbool(), - /* fRelayTxes */ random_context.randbool(), - /* fBloomFilter */ random_context.randbool(), - /* nKeyedNetGroup */ random_context.randrange(100), - /* prefer_evict */ random_context.randbool(), - /* m_is_local */ random_context.randbool(), - /* m_network */ ALL_NETWORKS[random_context.randrange(ALL_NETWORKS.size())], + /*id=*/id, + /*nTimeConnected=*/static_cast<int64_t>(random_context.randrange(100)), + /*m_min_ping_time=*/std::chrono::microseconds{random_context.randrange(100)}, + /*nLastBlockTime=*/static_cast<int64_t>(random_context.randrange(100)), + /*nLastTXTime=*/static_cast<int64_t>(random_context.randrange(100)), + /*fRelevantServices=*/random_context.randbool(), + /*fRelayTxes=*/random_context.randbool(), + /*fBloomFilter=*/random_context.randbool(), + /*nKeyedNetGroup=*/random_context.randrange(100), + /*prefer_evict=*/random_context.randbool(), + /*m_is_local=*/random_context.randbool(), + /*m_network=*/ALL_NETWORKS[random_context.randrange(ALL_NETWORKS.size())], }); } return candidates; diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 5a0c8e152a..6a74394e97 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -179,7 +179,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const m_node.chainman->InitializeChainstate(m_node.mempool.get()); m_node.chainman->ActiveChainstate().InitCoinsDB( - /* cache_size_bytes */ 1 << 23, /* in_memory */ true, /* should_wipe */ false); + /*cache_size_bytes=*/1 << 23, /*in_memory=*/true, /*should_wipe=*/false); assert(!m_node.chainman->ActiveChainstate().CanFlushToDisk()); m_node.chainman->ActiveChainstate().InitCoinsCache(1 << 23); assert(m_node.chainman->ActiveChainstate().CanFlushToDisk()); @@ -192,7 +192,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", state.ToString())); } - m_node.addrman = std::make_unique<AddrMan>(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0); + m_node.addrman = std::make_unique<AddrMan>(/*asmap=*/std::vector<bool>(), /*deterministic=*/false, /*consistency_check_ratio=*/0); m_node.banman = std::make_unique<BanMan>(m_args.GetDataDirBase() / "banlist", nullptr, DEFAULT_MISBEHAVING_BANTIME); m_node.connman = std::make_unique<CConnman>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests. m_node.peerman = PeerManager::make(chainparams, *m_node.connman, *m_node.addrman, |