aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-31 20:50:21 +0800
committerFelix Lange <fjl@twurst.com>2015-08-31 20:50:21 +0800
commit9dc23ce284944d68ffc64cc4fb6f5d293a179fa0 (patch)
tree27fa0d2f7b4a41b27adb307295c63b6aa3fa117d /rpc/api
parent1801748ccd3486f757329e7f23ca4c6c8887f327 (diff)
parent8b12bcc0ac7527d094334cab694a72e79d269592 (diff)
downloadgo-tangerine-9dc23ce284944d68ffc64cc4fb6f5d293a179fa0.tar.gz
go-tangerine-9dc23ce284944d68ffc64cc4fb6f5d293a179fa0.tar.zst
go-tangerine-9dc23ce284944d68ffc64cc4fb6f5d293a179fa0.zip
Merge pull request #1742 from fjl/rpc-receipt-root
rpc: add receiptRoot to getBlock* responses
Diffstat (limited to 'rpc/api')
-rw-r--r--rpc/api/parsing.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/api/parsing.go b/rpc/api/parsing.go
index 0698e8dbe..5858bc136 100644
--- a/rpc/api/parsing.go
+++ b/rpc/api/parsing.go
@@ -169,6 +169,7 @@ type BlockRes struct {
LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"`
+ ReceiptRoot *hexdata `json:"receiptRoot"`
Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"`
TotalDifficulty *hexnum `json:"totalDifficulty"`
@@ -192,6 +193,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"`
+ ReceiptRoot *hexdata `json:"receiptRoot"`
Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"`
TotalDifficulty *hexnum `json:"totalDifficulty"`
@@ -212,6 +214,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
ext.LogsBloom = b.LogsBloom
ext.TransactionRoot = b.TransactionRoot
ext.StateRoot = b.StateRoot
+ ext.ReceiptRoot = b.ReceiptRoot
ext.Miner = b.Miner
ext.Difficulty = b.Difficulty
ext.TotalDifficulty = b.TotalDifficulty
@@ -236,6 +239,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionsRoot"`
StateRoot *hexdata `json:"stateRoot"`
+ ReceiptRoot *hexdata `json:"receiptRoot"`
Miner *hexdata `json:"miner"`
Difficulty *hexnum `json:"difficulty"`
TotalDifficulty *hexnum `json:"totalDifficulty"`
@@ -256,6 +260,7 @@ func (b *BlockRes) MarshalJSON() ([]byte, error) {
ext.LogsBloom = b.LogsBloom
ext.TransactionRoot = b.TransactionRoot
ext.StateRoot = b.StateRoot
+ ext.ReceiptRoot = b.ReceiptRoot
ext.Miner = b.Miner
ext.Difficulty = b.Difficulty
ext.TotalDifficulty = b.TotalDifficulty
@@ -291,6 +296,7 @@ func NewBlockRes(block *types.Block, fullTx bool) *BlockRes {
res.LogsBloom = newHexData(block.Bloom())
res.TransactionRoot = newHexData(block.TxHash())
res.StateRoot = newHexData(block.Root())
+ res.ReceiptRoot = newHexData(block.ReceiptHash())
res.Miner = newHexData(block.Coinbase())
res.Difficulty = newHexNum(block.Difficulty())
res.TotalDifficulty = newHexNum(block.Td)