Make Hash[160] consume range-like objects

This commit is contained in:
Pieter Wuille
2020-06-26 13:36:41 -07:00
parent 02c4cc5c5d
commit 77c507358b
16 changed files with 40 additions and 63 deletions

View File

@@ -553,7 +553,7 @@ std::vector<unsigned char> CNetAddr::GetGroup(const std::vector<bool> &asmap) co
uint64_t CNetAddr::GetHash() const
{
uint256 hash = Hash(&ip[0], &ip[16]);
uint256 hash = Hash(ip);
uint64_t nRet;
memcpy(&nRet, &hash, sizeof(nRet));
return nRet;