aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-04-01 21:28:06 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-04-01 21:28:06 +0800
commit6e8ff578f18473d7c4fe013a88d2bece1ecf65d1 (patch)
treedfb10e65c2b7f15a33217d2c2d88a60309eb8bb2 /rpc
parent93f832a1a76430ebb18276aaf2a3f18d000edae2 (diff)
downloadgo-tangerine-6e8ff578f18473d7c4fe013a88d2bece1ecf65d1.tar.gz
go-tangerine-6e8ff578f18473d7c4fe013a88d2bece1ecf65d1.tar.zst
go-tangerine-6e8ff578f18473d7c4fe013a88d2bece1ecf65d1.zip
Block nonce as data
Diffstat (limited to 'rpc')
-rw-r--r--rpc/responses.go4
-rw-r--r--rpc/responses_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/rpc/responses.go b/rpc/responses.go
index 45a2fa18b..0f67299fc 100644
--- a/rpc/responses.go
+++ b/rpc/responses.go
@@ -11,7 +11,7 @@ type BlockRes struct {
BlockNumber *hexnum `json:"number"`
BlockHash *hexdata `json:"hash"`
ParentHash *hexdata `json:"parentHash"`
- Nonce *hexnum `json:"nonce"`
+ Nonce *hexdata `json:"nonce"`
Sha3Uncles *hexdata `json:"sha3Uncles"`
LogsBloom *hexdata `json:"logsBloom"`
TransactionRoot *hexdata `json:"transactionRoot"`
@@ -41,7 +41,7 @@ func NewBlockRes(block *types.Block, fullTx bool) *BlockRes {
res.BlockNumber = newHexNum(block.Number())
res.BlockHash = newHexData(block.Hash())
res.ParentHash = newHexData(block.ParentHash())
- res.Nonce = newHexNum(block.Header().Nonce)
+ res.Nonce = newHexData(block.Header().Nonce)
res.Sha3Uncles = newHexData(block.Header().UncleHash)
res.LogsBloom = newHexData(block.Bloom())
res.TransactionRoot = newHexData(block.Header().TxHash)
diff --git a/rpc/responses_test.go b/rpc/responses_test.go
index 702fc5c22..949e1794b 100644
--- a/rpc/responses_test.go
+++ b/rpc/responses_test.go
@@ -34,7 +34,7 @@ func TestNewBlockRes(t *testing.T) {
"number": reNum,
"hash": reHash,
"parentHash": reHash,
- "nonce": reNum,
+ "nonce": reData,
"sha3Uncles": reHash,
"logsBloom": reData,
"transactionRoot": reHash,