Exclude fallback function from the internal functions in estimateGas

This commit is contained in:
Alex Beregszaszi 2017-04-10 14:59:30 +01:00
parent 328f2b0a8e
commit 3fbb48bd46

View File

@ -903,7 +903,8 @@ Json::Value CompilerStack::gasEstimates(string const& _contractName) const
Json::Value internalFunctions(Json::objectValue);
for (auto const& it: contract.definedFunctions())
{
if (it->isPartOfExternalInterface() || it->isConstructor())
/// Exclude externally visible functions, constructor and the fallback function
if (it->isPartOfExternalInterface() || it->isConstructor() || it->name().empty())
continue;
size_t entry = functionEntryPoint(_contractName, *it);