aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/responses.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/responses.go')
-rw-r--r--rpc/responses.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/rpc/responses.go b/rpc/responses.go
index f5f3a33f3..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()
@@ -243,8 +243,8 @@ func (l *LogRes) MarshalJSON() ([]byte, error) {
}
ext.Address = l.Address.Hex()
- ext.Data = common.Bytes2Hex(l.Data)
- ext.Number = common.Bytes2Hex(big.NewInt(int64(l.Number)).Bytes())
+ ext.Data = common.ToHex(l.Data)
+ ext.Number = common.ToHex(big.NewInt(int64(l.Number)).Bytes())
ext.Topics = make([]string, len(l.Topics))
for i, v := range l.Topics {
ext.Topics[i] = v.Hex()