aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-04-18 04:44:26 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-04-18 04:44:26 +0800
commitd399f077eff87a2589188fe6353a42c7dd60597a (patch)
tree22c6cad7eaea7c71f1c45cbe4dc7cb857e9298ee /TestHelper.cpp
parent22d16c048bde69eb66d315990f2d407f7384cf4f (diff)
downloaddexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar.gz
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar.bz2
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar.lz
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar.xz
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.tar.zst
dexon-solidity-d399f077eff87a2589188fe6353a42c7dd60597a.zip
simplification
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r--TestHelper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index 49c6bb02..ed844e96 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -140,7 +140,7 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
str = value.get_str();
else continue;
- _o[key] = (str.substr(0, 2) == "0x") ? str : "0x" + (toHex(toCompactBigEndian(toInt(str))).empty() ? "0" : toHex(toCompactBigEndian(toInt(str))));
+ _o[key] = (str.substr(0, 2) == "0x") ? str : "0x" + toHex(toCompactBigEndian(toInt(str), 1));
}
return _o;
}
@@ -363,8 +363,8 @@ json_spirit::mObject fillJsonWithState(State _state)
for (auto const& a: _state.addresses())
{
json_spirit::mObject o;
- o["balance"] = "0x" + (toHex(toCompactBigEndian(_state.balance(a.first))).empty() ? "0" : toHex(toCompactBigEndian(_state.balance(a.first))));
- o["nonce"] = "0x" + (toHex(toCompactBigEndian(_state.transactionsFrom(a.first))).empty() ? "0" : toHex(toCompactBigEndian(_state.transactionsFrom(a.first))));
+ o["balance"] = "0x" + toHex(toCompactBigEndian(_state.balance(a.first), 1));
+ o["nonce"] = "0x" + toHex(toCompactBigEndian(_state.transactionsFrom(a.first), 1));
{
json_spirit::mObject store;
for (auto const& s: _state.storage(a.first))