Replace MakeSpan helper with Span deduction guide

This commit is contained in:
Pieter Wuille
2021-11-01 16:32:53 -04:00
parent 383d350bd5
commit 568dd2f839
16 changed files with 106 additions and 104 deletions

View File

@@ -149,7 +149,7 @@ std::string EncodeBase58Check(Span<const unsigned char> input)
return false;
}
// re-calculate the checksum, ensure it matches the included 4-byte checksum
uint256 hash = Hash(MakeSpan(vchRet).first(vchRet.size() - 4));
uint256 hash = Hash(Span{vchRet}.first(vchRet.size() - 4));
if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
vchRet.clear();
return false;