From 6e8ff578f18473d7c4fe013a88d2bece1ecf65d1 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 1 Apr 2015 15:28:06 +0200 Subject: Block nonce as data --- rpc/responses.go | 4 ++-- rpc/responses_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'rpc') 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, -- cgit