From 3fbb48bd46b613f83c6918e3b43068c72a214965 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 10 Apr 2017 14:59:30 +0100 Subject: Exclude fallback function from the internal functions in estimateGas --- libsolidity/interface/CompilerStack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libsolidity/interface') diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 0fddd505..ea648709 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -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); -- cgit