Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit 8fadd48

Browse files
committed
eth_getBlockBy* empty extraData is exported as "0x"
1 parent 64262c7 commit 8fadd48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libweb3jsonrpc/JsonHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Json::Value toJson(dev::eth::BlockHeader const& _bi, SealEngineFace* _sealer)
8383
res["number"] = toJS(_bi.number());
8484
res["gasUsed"] = toJS(_bi.gasUsed());
8585
res["gasLimit"] = toJS(_bi.gasLimit());
86-
res["extraData"] = toJS(_bi.extraData());
86+
res["extraData"] = _bi.extraData().empty() ? "0x" : toJS(_bi.extraData());
8787
res["logsBloom"] = toJS(_bi.logBloom());
8888
res["timestamp"] = toJS(_bi.timestamp());
8989
// TODO: remove once JSONRPC spec is updated to use "author" over "miner".

0 commit comments

Comments
 (0)