aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-29 18:08:52 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-29 18:08:52 +0800
commit391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd (patch)
tree0dcc1f2f8f3f93f19fae05ca572408f8935dcc13
parenteb79938060fff279dbac5fc2a599bb27b52c085c (diff)
downloaddexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar.gz
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar.bz2
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar.lz
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar.xz
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.tar.zst
dexon-391d79ef44ad2e76754ef8dfb5e9dfbdd5a69acd.zip
Add ExtraData field to RPC output
-rw-r--r--rpc/responses.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/responses.go b/rpc/responses.go
index d219ebd72..9767cac3b 100644
--- a/rpc/responses.go
+++ b/rpc/responses.go
@@ -70,7 +70,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
ext.Difficulty = common.ToHex(b.Difficulty.Bytes())
ext.TotalDifficulty = common.ToHex(b.TotalDifficulty.Bytes())
ext.Size = common.ToHex(b.Size.Bytes())
- // ext.ExtraData = common.ToHex(b.ExtraData)
+ ext.ExtraData = common.ToHex(b.ExtraData)
ext.GasLimit = common.ToHex(b.GasLimit.Bytes())
// ext.MinGasPrice = common.ToHex(big.NewInt(b.MinGasPrice).Bytes())
ext.GasUsed = common.ToHex(b.GasUsed.Bytes())
@@ -111,7 +111,7 @@ func NewBlockRes(block *types.Block) *BlockRes {
res.Difficulty = block.Difficulty()
res.TotalDifficulty = block.Td
res.Size = big.NewInt(int64(block.Size()))
- // res.ExtraData =
+ res.ExtraData = []byte(block.Header().Extra)
res.GasLimit = block.GasLimit()
// res.MinGasPrice =
res.GasUsed = block.GasUsed()