diff options
Diffstat (limited to 'src/test/util/net.cpp')
-rw-r--r-- | src/test/util/net.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/util/net.cpp b/src/test/util/net.cpp index 28d7967078..fe3cf52974 100644 --- a/src/test/util/net.cpp +++ b/src/test/util/net.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2020 The Bitcoin Core developers +// Copyright (c) 2020-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -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, + /*m_connected=*/std::chrono::seconds{random_context.randrange(100)}, + /*m_min_ping_time=*/std::chrono::microseconds{random_context.randrange(100)}, + /*m_last_block_time=*/std::chrono::seconds{random_context.randrange(100)}, + /*m_last_tx_time=*/std::chrono::seconds{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; |