aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-11 23:25:15 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-11 23:25:15 +0800
commitd465e410eff0ab255d0e427a8cf2f37ac10311da (patch)
treee1b3abee95b1a1ba172e044b87db55069f1e54af
parent6bca40274f2056b8516543d8cc1600224789b77f (diff)
downloaddexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar.gz
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar.bz2
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar.lz
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar.xz
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.tar.zst
dexon-d465e410eff0ab255d0e427a8cf2f37ac10311da.zip
TxIndex -> Index
-rw-r--r--rpc/api.go8
-rw-r--r--rpc/args.go4
-rw-r--r--rpc/responses.go1
3 files changed, 7 insertions, 6 deletions
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
diff --git a/rpc/args.go b/rpc/args.go
index 2f361526a..ff41e501f 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -219,12 +219,12 @@ func (args *GetDataArgs) requirements() error {
type BlockNumIndexArgs struct {
BlockNumber int64
- TxIndex int64
+ Index int64
}
type HashIndexArgs struct {
BlockHash string
- TxIndex int64
+ Index int64
}
type Sha3Args struct {
diff --git a/rpc/responses.go b/rpc/responses.go
index 20b13f6e2..f41ce7b96 100644
--- a/rpc/responses.go
+++ b/rpc/responses.go
@@ -2,6 +2,7 @@ package rpc
import (
"encoding/json"
+ // "fmt"
"math/big"
"github.com/ethereum/go-ethereum/core/types"