diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-10 21:59:30 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-13 09:17:40 +0800 |
commit | 3fbb48bd46b613f83c6918e3b43068c72a214965 (patch) | |
tree | a315e6d82f3cf5dc3eb825107585eeb04932a5cc /libsolidity/interface | |
parent | 328f2b0a8efa41d0343b4df022ce1106a5984fb4 (diff) | |
download | dexon-solidity-3fbb48bd46b613f83c6918e3b43068c72a214965.tar.gz dexon-solidity-3fbb48bd46b613f83c6918e3b43068c72a214965.tar.zst dexon-solidity-3fbb48bd46b613f83c6918e3b43068c72a214965.zip |
Exclude fallback function from the internal functions in estimateGas
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |