diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-04-18 04:44:26 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-04-18 04:44:26 +0800 |
commit | d399f077eff87a2589188fe6353a42c7dd60597a (patch) | |
tree | 22c6cad7eaea7c71f1c45cbe4dc7cb857e9298ee /blockchain.cpp | |
parent | 22d16c048bde69eb66d315990f2d407f7384cf4f (diff) | |
download | dexon-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 'blockchain.cpp')
-rw-r--r-- | blockchain.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/blockchain.cpp b/blockchain.cpp index 50218207..ec8fb753 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -625,11 +625,11 @@ void writeBlockHeaderToJson(mObject& _o, BlockInfo const& _bi) _o["transactionsTrie"] = toString(_bi.transactionsRoot); _o["receiptTrie"] = toString(_bi.receiptsRoot); _o["bloom"] = toString(_bi.logBloom); - _o["difficulty"] = "0x" + (toHex(toCompactBigEndian(_bi.difficulty)).empty() ? "0" : toHex(toCompactBigEndian(_bi.difficulty))); - _o["number"] = "0x" + (toHex(toCompactBigEndian(_bi.number)).empty() ? "0" : toHex(toCompactBigEndian(_bi.number))); - _o["gasLimit"] = "0x" + (toHex(toCompactBigEndian(_bi.gasLimit)).empty() ? "0" : toHex(toCompactBigEndian(_bi.gasLimit))); - _o["gasUsed"] = "0x" + (toHex(toCompactBigEndian(_bi.gasUsed)).empty() ? "0" : toHex(toCompactBigEndian(_bi.gasUsed))); - _o["timestamp"] = "0x" + (toHex(toCompactBigEndian(_bi.timestamp)).empty() ? "0" : toHex(toCompactBigEndian(_bi.timestamp))); + _o["difficulty"] = "0x" + toHex(toCompactBigEndian(_bi.difficulty), 1); + _o["number"] = "0x" + toHex(toCompactBigEndian(_bi.number), 1); + _o["gasLimit"] = "0x" + toHex(toCompactBigEndian(_bi.gasLimit), 1); + _o["gasUsed"] = "0x" + toHex(toCompactBigEndian(_bi.gasUsed), 1); + _o["timestamp"] = "0x" + toHex(toCompactBigEndian(_bi.timestamp), 1); _o["extraData"] ="0x" + toHex(_bi.extraData); _o["mixHash"] = toString(_bi.mixHash); _o["nonce"] = toString(_bi.nonce); |