diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-09 07:27:26 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-09 07:27:26 +0800 |
commit | 9cf1c066fce4909e2ce2adebc713beef941508c6 (patch) | |
tree | 76388826ae2af11d4023bf82672668d69e720db5 /AST.cpp | |
parent | a7b661d3be53b4c6a05401782ab8f90202a4f776 (diff) | |
download | dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar.gz dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar.bz2 dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar.lz dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar.xz dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.tar.zst dexon-solidity-9cf1c066fce4909e2ce2adebc713beef941508c6.zip |
Adjustments to Solidity compiler code for Function Hash
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -59,7 +59,9 @@ map<FixedHash<4>, FunctionDefinition const*> ContractDefinition::getInterfaceFun if (f->isPublic() && f->getName() != getName()) { FixedHash<4> hash(dev::sha3(f->getCanonicalSignature())); - exportedFunctions[hash] = f.get(); + auto res = exportedFunctions.insert(std::make_pair(hash,f.get())); + if (!res.second) + solAssert(false, "Hash collision at Function Definition Hash calculation"); } return exportedFunctions; |