mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-28 00:27:26 +00:00
Return nil for certain fields on eth_getBlockByNumber pending
This commit is contained in:
parent
67d44519ce
commit
d381d9a74c
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue