From d465e410eff0ab255d0e427a8cf2f37ac10311da Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 11 Mar 2015 10:25:15 -0500 Subject: TxIndex -> Index --- rpc/api.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rpc/api.go') diff --git a/rpc/api.go b/rpc/api.go index f552b3ef3..335f6cabd 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -608,10 +608,10 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err != nil { return err } - if args.TxIndex > int64(len(v.Transactions)) || args.TxIndex < 0 { + if args.Index > int64(len(v.Transactions)) || args.Index < 0 { return NewErrorWithMessage(errDecodeArgs, "Transaction index does not exist") } - *reply = v.Transactions[args.TxIndex] + *reply = v.Transactions[args.Index] case "eth_getTransactionByBlockNumberAndIndex": args := new(BlockNumIndexArgs) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -622,10 +622,10 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error if err != nil { return err } - if args.TxIndex > int64(len(v.Transactions)) || args.TxIndex < 0 { + if args.Index > int64(len(v.Transactions)) || args.Index < 0 { return NewErrorWithMessage(errDecodeArgs, "Transaction index does not exist") } - *reply = v.Transactions[args.TxIndex] + *reply = v.Transactions[args.Index] case "eth_getUncleByBlockHashAndIndex": case "eth_getUncleByBlockNumberAndIndex": return errNotImplemented -- cgit