mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1604 from ethereum/checksums
Warn about invalid checksums of addresses.
This commit is contained in:
@@ -436,6 +436,11 @@ bool CommandLineInterface::parseLibraryOption(string const& _input)
|
||||
string addrString(lib.begin() + colon + 1, lib.end());
|
||||
boost::trim(libName);
|
||||
boost::trim(addrString);
|
||||
if (!passesAddressChecksum(addrString, false))
|
||||
{
|
||||
cerr << "Invalid checksum on library address \"" << libName << "\": " << addrString << endl;
|
||||
return false;
|
||||
}
|
||||
bytes binAddr = fromHex(addrString);
|
||||
h160 address(binAddr, h160::AlignRight);
|
||||
if (binAddr.size() > 20 || address == h160())
|
||||
|
||||
Reference in New Issue
Block a user