{
// add 4-byte hash check to the end
std::vector<unsigned char> vch(vchIn);
- uint256 hash = Hash(vch.begin(), vch.end());
+ auto hash = Hash(vch.begin(), vch.end());
vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
return EncodeBase58(vch);
}
vchRet.clear();
return false;
}
- uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
+ auto hash = Hash(vchRet.begin(), vchRet.end()-4);
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
{
vchRet.clear();
return true;
}
+ bool CBitcoinAddress::Set(const CBitcoinAddress &dest)
+ {
+ nVersion = dest.nVersion;
+ vchData = dest.vchData;
+ return true;
+ }
+
bool CBitcoinAddress::IsValid() const
{
unsigned int nExpectedSize = 20;