diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 21:17:32 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-26 21:17:32 +0800 |
commit | 3472823be94acc5b999dcb8741901b3e0c07f5d6 (patch) | |
tree | b9dbde3af918ed179e0aff69a089c496bff0e105 /rpc/api.go | |
parent | cb103c089a7c9238326e6a9bb336e375281ca622 (diff) | |
download | dexon-3472823be94acc5b999dcb8741901b3e0c07f5d6.tar.gz dexon-3472823be94acc5b999dcb8741901b3e0c07f5d6.tar.zst dexon-3472823be94acc5b999dcb8741901b3e0c07f5d6.zip |
HashIndexArgs
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc/api.go b/rpc/api.go index 0f5bac657..ff166264b 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -212,7 +212,7 @@ 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 := api.xeth().EthTransactionByHash(args.Hash.Hex()) if tx != nil { *reply = NewTransactionRes(tx) } @@ -222,7 +222,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err return err } - block := api.xeth().EthBlockByHexstring(args.Hash) + block := api.xeth().EthBlockByHash(args.Hash) br := NewBlockRes(block) br.fullTx = true @@ -250,7 +250,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err return err } - br := NewBlockRes(api.xeth().EthBlockByHexstring(args.Hash)) + br := NewBlockRes(api.xeth().EthBlockByHash(args.Hash)) if args.Index > int64(len(br.Uncles)) || args.Index < 0 { return NewValidationError("Index", "does not exist") |