diff options
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rpc/api.go b/rpc/api.go index 3f5d33da6..48039511e 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -199,9 +199,13 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err args := new(HashIndexArgs) if err := json.Unmarshal(req.Params, &args); err != nil { } - tx := api.xeth().EthTransactionByHash(args.Hash) + tx, bhash, bnum, txi := api.xeth().EthTransactionByHash(args.Hash) if tx != nil { - *reply = NewTransactionRes(tx) + v := NewTransactionRes(tx) + v.BlockHash = newHexData(bhash) + v.BlockNumber = newHexNum(bnum) + v.TxIndex = newHexNum(txi) + *reply = v } case "eth_getTransactionByBlockHashAndIndex": args := new(HashIndexArgs) |