aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 08:12:12 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-20 08:12:12 +0800
commitcc91ba0add5e21a6d2f67a16ee5f08b74b597edd (patch)
treeba70d08aedc417a0326fee9ae71637cfb3682c30 /rpc/api.go
parent0eb9572d642ee7fe5d730b6396f5c348c482e7d6 (diff)
downloadgo-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar.gz
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar.bz2
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar.lz
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar.xz
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.tar.zst
go-tangerine-cc91ba0add5e21a6d2f67a16ee5f08b74b597edd.zip
inline GetTransactionByHash
Diffstat (limited to 'rpc/api.go')
-rw-r--r--rpc/api.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 7ecde4c24..ff89bbecf 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -352,14 +352,6 @@ func (p *EthereumApi) WhisperMessages(id int, reply *interface{}) error {
return nil
}
-func (p *EthereumApi) GetTransactionByHash(hash string, reply *interface{}) error {
- tx := p.xeth().EthTransactionByHash(hash)
- if tx != nil {
- *reply = NewTransactionRes(tx)
- }
- return nil
-}
-
func (p *EthereumApi) GetBlockByHash(blockhash string, includetx bool) (*BlockRes, error) {
block := p.xeth().EthBlockByHash(blockhash)
br := NewBlockRes(block)
@@ -566,7 +558,10 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
args := new(HashIndexArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {
}
- return p.GetTransactionByHash(args.Hash, reply)
+ tx := p.xeth().EthTransactionByHash(hash)
+ if tx != nil {
+ *reply = NewTransactionRes(tx)
+ }
case "eth_getTransactionByBlockHashAndIndex":
args := new(HashIndexArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {