aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-05-31 14:57:32 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-05-31 14:56:17 +0200
commitffff0d04425a616c14fc4a562e8ef93d286705f8 (patch)
tree1fe09f283467aa165a518290a90213b11b4a74ef /src/addrman.cpp
parent8c6df2b4ca1da716e2c834f0c3d18345c73c8c2c (diff)
refactor: Switch serialize to uint8_t (1/n)
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index ceab1689d7..14b412a038 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -36,7 +36,7 @@ int CAddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src, const std:
int CAddrInfo::GetBucketPosition(const uint256 &nKey, bool fNew, int nBucket) const
{
- uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << (fNew ? 'N' : 'K') << nBucket << GetKey()).GetCheapHash();
+ uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << (fNew ? uint8_t{'N'} : uint8_t{'K'}) << nBucket << GetKey()).GetCheapHash();
return hash1 % ADDRMAN_BUCKET_SIZE;
}
@@ -652,7 +652,7 @@ std::vector<bool> CAddrMan::DecodeAsmap(fs::path path)
int length = ftell(filestr);
LogPrintf("Opened asmap file %s (%d bytes) from disk\n", path, length);
fseek(filestr, 0, SEEK_SET);
- char cur_byte;
+ uint8_t cur_byte;
for (int i = 0; i < length; ++i) {
file >> cur_byte;
for (int bit = 0; bit < 8; ++bit) {