From 54dcb0e11be09caf35e02792d47695685ba1f4cb Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 12 Apr 2017 12:06:01 +0100 Subject: Keep gas values as a string in CompilerStack::gasEstimate --- libsolidity/interface/CompilerStack.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libsolidity') diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index ea648709..92b49cda 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -848,10 +848,10 @@ namespace Json::Value gasToJson(GasEstimator::GasConsumption const& _gas) { - if (_gas.isInfinite || _gas.value > std::numeric_limits::max()) - return Json::Value(Json::nullValue); + if (_gas.isInfinite) + return Json::Value("infinite"); else - return Json::Value(Json::LargestUInt(_gas.value)); + return Json::Value(toString(_gas.value)); } } -- cgit