diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-12-13 12:02:10 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-12-13 12:32:09 +0100 |
commit | fad7ead146a152f46b25ce6623e05cbb1dbc8cca (patch) | |
tree | 3eb7c696b2d23d76dda3b6b95e819efc9e826d80 /src/test/util | |
parent | eb63b8fab91c3aec46ef4ae66e6241ed5de49bbd (diff) |
refactor: Use type-safe std::chrono in net
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/util/net.cpp b/src/test/util/net.cpp index 696fd902f8..29e1a85e2e 100644 --- a/src/test/util/net.cpp +++ b/src/test/util/net.cpp @@ -47,10 +47,10 @@ std::vector<NodeEvictionCandidate> GetRandomNodeEvictionCandidates(int n_candida for (int id = 0; id < n_candidates; ++id) { candidates.push_back({ /*id=*/id, - /*nTimeConnected=*/static_cast<int64_t>(random_context.randrange(100)), + /*nTimeConnected=*/std::chrono::seconds{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)), + /*nLastBlockTime=*/std::chrono::seconds{random_context.randrange(100)}, + /*nLastTXTime=*/std::chrono::seconds{random_context.randrange(100)}, /*fRelevantServices=*/random_context.randbool(), /*fRelayTxes=*/random_context.randbool(), /*fBloomFilter=*/random_context.randbool(), |