refactor: Avoid needless, unsafe c-style cast

This commit is contained in:
MarcoFalke 2024-02-06 19:47:16 +01:00
parent 477b357460
commit fac3a782ea
No known key found for this signature in database

View file

@ -139,7 +139,7 @@ std::string EncodeBase58Check(Span<const unsigned char> input)
// add 4-byte hash check to the end
std::vector<unsigned char> vch(input.begin(), input.end());
uint256 hash = Hash(vch);
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
vch.insert(vch.end(), hash.data(), hash.data() + 4);
return EncodeBase58(vch);
}