Skip to content

Commit

Permalink
Merge pull request ethereum#4881 from LoveULin/test-addsize-to-getblock
Browse files Browse the repository at this point in the history
add size to output of eth_getBlockByHash & eth_getBlockByNumber
  • Loading branch information
chfast authored Mar 14, 2018
2 parents 67d4065 + ff63dc2 commit 8e1802b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libweb3jsonrpc/JsonHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Json::Value toJson(dev::eth::BlockHeader const& _bi, BlockDetails const& _bd, Un
if (_bi)
{
res["totalDifficulty"] = toJS(_bd.totalDifficulty);
res["size"] = toJS(_bd.size);
res["uncles"] = Json::Value(Json::arrayValue);
for (h256 h: _us)
res["uncles"].append(toJS(h));
Expand All @@ -156,6 +157,7 @@ Json::Value toJson(dev::eth::BlockHeader const& _bi, BlockDetails const& _bd, Un
if (_bi)
{
res["totalDifficulty"] = toJS(_bd.totalDifficulty);
res["size"] = toJS(_bd.size);
res["uncles"] = Json::Value(Json::arrayValue);
for (h256 h: _us)
res["uncles"].append(toJS(h));
Expand Down

0 comments on commit 8e1802b

Please sign in to comment.