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

@@ -157,13 +157,13 @@ public:
//! Get the KeyID of this public key (hash of its serialization)
CKeyID GetID() const
{
return CKeyID(Hash160(vch, vch + size()));
return CKeyID(Hash160(MakeSpan(vch).first(size())));
}
//! Get the 256-bit hash of this public key.
uint256 GetHash() const
{
return Hash(vch, vch + size());
return Hash(MakeSpan(vch).first(size()));
}
/*