mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
Improve readability of DecodeBase58Check(...)
This commit is contained in:
parent
affe9271aa
commit
c6a995e7e5
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
|
||||||
}
|
}
|
||||||
// re-calculate the checksum, ensure it matches the included 4-byte checksum
|
// re-calculate the checksum, ensure it matches the included 4-byte checksum
|
||||||
uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4);
|
uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4);
|
||||||
if (memcmp(&hash, &vchRet.end()[-4], 4) != 0) {
|
if (memcmp(&hash, &vchRet[vchRet.size() - 4], 4) != 0) {
|
||||||
vchRet.clear();
|
vchRet.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue