From d381d9a74cc2cb4e8cebf21aa9e4927a6e1867d6 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 18 May 2015 09:16:10 -0500 Subject: [PATCH] Return nil for certain fields on eth_getBlockByNumber pending --- rpc/api.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rpc/api.go b/rpc/api.go index b59253ef73..47409b4aff 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -231,6 +231,13 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err block := api.xeth().EthBlockByNumber(args.BlockNumber) br := NewBlockRes(block, args.IncludeTxs) + if args.BlockNumber == -2 { + br.BlockHash = nil + br.BlockNumber = nil + br.Miner = nil + br.Nonce = nil + br.LogsBloom = nil + } *reply = br case "eth_getTransactionByHash": args := new(HashArgs)