Skip to content

Commit

Permalink
refactor: Use HashWriter over legacy CHashWriter (via SerializeHash)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Aug 25, 2023
1 parent 5555aa2 commit 99995cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/netgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99995cf

Please sign in to comment.