diff options
author | pasta <pasta@dashboost.org> | 2022-01-31 19:32:59 +0700 |
---|---|---|
committer | pasta <pasta@dashboost.org> | 2022-04-22 09:04:39 -0500 |
commit | ab1ea29ba1b8379a21fabd3dc859552c470a6421 (patch) | |
tree | 799d831027961f820f5472ce75e93f14cd3e5217 /src/addrdb.cpp | |
parent | 505ba3966562b10d6dd4162f3216a120c73a4edb (diff) |
refactor: make GetRand a template, remove GetRandInt
Diffstat (limited to 'src/addrdb.cpp')
-rw-r--r-- | src/addrdb.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/addrdb.cpp b/src/addrdb.cpp index 0a76f83150..299cbdcf6a 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -49,8 +49,7 @@ template <typename Data> bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data& data, int version) { // Generate random temporary filename - uint16_t randv = 0; - GetRandBytes({(unsigned char*)&randv, sizeof(randv)}); + const uint16_t randv{GetRand<uint16_t>()}; std::string tmpfn = strprintf("%s.%04x", prefix, randv); // open temp output file, and associate with CAutoFile |