Skip to content

Commit 99995cf

Browse files
author
MarcoFalke
committed
refactor: Use HashWriter over legacy CHashWriter (via SerializeHash)
1 parent 5555aa2 commit 99995cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
11951195
InitError(strprintf(_("Could not parse asmap file %s"), fs::quoted(fs::PathToString(asmap_path))));
11961196
return false;
11971197
}
1198-
const uint256 asmap_version = SerializeHash(asmap);
1198+
const uint256 asmap_version = (HashWriter{} << asmap).GetHash();
11991199
LogPrintf("Using asmap version %s for IP bucketing\n", asmap_version.ToString());
12001200
} else {
12011201
LogPrintf("Using /16 prefix for IP bucketing\n");

src/netgroup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ uint256 NetGroupManager::GetAsmapChecksum() const
1111
{
1212
if (!m_asmap.size()) return {};
1313

14-
return SerializeHash(m_asmap);
14+
return (HashWriter{} << m_asmap).GetHash();
1515
}
1616

1717
std::vector<unsigned char> NetGroupManager::GetGroup(const CNetAddr& address) const

0 commit comments

Comments
 (0)