diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-11 17:01:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-13 09:17:40 +0800 |
commit | fe4fccaaf21dbb7cbfed9b758a3d8f12f979c6dc (patch) | |
tree | e8b102dfeee93aa8e32fc17e116a9bb35b01bf94 /solc | |
parent | 3fbb48bd46b613f83c6918e3b43068c72a214965 (diff) | |
download | dexon-solidity-fe4fccaaf21dbb7cbfed9b758a3d8f12f979c6dc.tar.gz dexon-solidity-fe4fccaaf21dbb7cbfed9b758a3d8f12f979c6dc.tar.zst dexon-solidity-fe4fccaaf21dbb7cbfed9b758a3d8f12f979c6dc.zip |
The gasEstimates objects must always be present in the jsonCompiler even if empty (backwards compat)
Diffstat (limited to 'solc')
-rw-r--r-- | solc/jsonCompiler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index b465d8db..accbc13c 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -70,8 +70,10 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract) creation[1] = estimates["creation"]["codeDepositCost"]; output["creation"] = creation; } - output["external"] = estimates["external"]; - output["internal"] = estimates["internal"]; + else + output["creation"] = Json::objectValue; + output["external"] = estimates.get("external", Json::objectValue); + output["internal"] = estimates.get("internal", Json::objectValue); return output; } |