diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-05-18 22:16:10 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-05-18 22:16:10 +0800 |
commit | d381d9a74cc2cb4e8cebf21aa9e4927a6e1867d6 (patch) | |
tree | d28b24651bc390eb70f6ef472712ece2b5cc3b5f /rpc | |
parent | 67d44519ce4344d5ee5f7cf37dd785ead70e8453 (diff) | |
download | go-tangerine-d381d9a74cc2cb4e8cebf21aa9e4927a6e1867d6.tar.gz go-tangerine-d381d9a74cc2cb4e8cebf21aa9e4927a6e1867d6.tar.zst go-tangerine-d381d9a74cc2cb4e8cebf21aa9e4927a6e1867d6.zip |
Return nil for certain fields on eth_getBlockByNumber pending
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rpc/api.go b/rpc/api.go index b59253ef7..47409b4af 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) |