aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CommandLineInterface.cpp5
-rw-r--r--jsonCompiler.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/CommandLineInterface.cpp b/CommandLineInterface.cpp
index ec2a9003..c95f34f6 100644
--- a/CommandLineInterface.cpp
+++ b/CommandLineInterface.cpp
@@ -273,6 +273,11 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
GasEstimator::GasConsumption gas = GasEstimator::functionalEstimation(*items, sig);
cout << " " << sig << ":\t" << gas << endl;
}
+ if (contract.getFallbackFunction())
+ {
+ GasEstimator::GasConsumption gas = GasEstimator::functionalEstimation(*items, "INVALID");
+ cout << " fallback:\t" << gas << endl;
+ }
cout << "internal:" << endl;
for (auto const& it: contract.getDefinedFunctions())
{
diff --git a/jsonCompiler.cpp b/jsonCompiler.cpp
index 7bde3e47..340713b1 100644
--- a/jsonCompiler.cpp
+++ b/jsonCompiler.cpp
@@ -91,6 +91,8 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract)
string sig = it.second->externalSignature();
externalFunctions[sig] = gasToJson(GasEstimator::functionalEstimation(*items, sig));
}
+ if (contract.getFallbackFunction())
+ externalFunctions[""] = gasToJson(GasEstimator::functionalEstimation(*items, "INVALID"));
gasEstimates["external"] = externalFunctions;
Json::Value internalFunctions(Json::objectValue);
for (auto const& it: contract.getDefinedFunctions())