From 99995cfe8da6ea2b93a6cd0e0bc84bb34cbb9d8c Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 25 Aug 2023 17:11:47 +0200 Subject: refactor: Use HashWriter over legacy CHashWriter (via SerializeHash) --- src/init.cpp | 2 +- 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 NetGroupManager::GetGroup(const CNetAddr& address) const -- cgit v1.2.3