diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-08-25 17:11:47 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-08-25 17:09:32 +0200 |
commit | 99995cfe8da6ea2b93a6cd0e0bc84bb34cbb9d8c (patch) | |
tree | 3c4a0d329ccbad50f4947404bb3e261361d26a3a | |
parent | 5555aa2d0ddcc478b95a431a57821199ef2c40ac (diff) |
refactor: Use HashWriter over legacy CHashWriter (via SerializeHash)
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/netgroup.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 35c37dac38..616883c3a1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1195,7 +1195,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) InitError(strprintf(_("Could not parse asmap file %s"), fs::quoted(fs::PathToString(asmap_path)))); return false; } - const uint256 asmap_version = SerializeHash(asmap); + const uint256 asmap_version = (HashWriter{} << asmap).GetHash(); LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString()); } else { LogPrintf("Using /16 prefix for IP bucketing\n"); diff --git a/src/netgroup.cpp b/src/netgroup.cpp index 87a1c4e036..2d4d231f2b 100644 --- a/src/netgroup.cpp +++ b/src/netgroup.cpp @@ -11,7 +11,7 @@ uint256 NetGroupManager::GetAsmapChecksum() const { if (!m_asmap.size()) return {}; - return SerializeHash(m_asmap); + return (HashWriter{} << m_asmap).GetHash(); } std::vector<unsigned char> NetGroupManager::GetGroup(const CNetAddr& address) const |