From 9cf1c066fce4909e2ce2adebc713beef941508c6 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Fri, 9 Jan 2015 00:27:26 +0100 Subject: Adjustments to Solidity compiler code for Function Hash --- AST.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'AST.cpp') diff --git a/AST.cpp b/AST.cpp index fb71e900..fd4cc57c 100644 --- a/AST.cpp +++ b/AST.cpp @@ -59,7 +59,9 @@ map, 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; -- cgit