Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
d465e410
Commit
d465e410
authored
Mar 11, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TxIndex -> Index
parent
6bca4027
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
api.go
rpc/api.go
+4
-4
args.go
rpc/args.go
+2
-2
responses.go
rpc/responses.go
+1
-0
No files found.
rpc/api.go
View file @
d465e410
...
...
@@ -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
.
Tx
Index
<
0
{
if
args
.
Index
>
int64
(
len
(
v
.
Transactions
))
||
args
.
Index
<
0
{
return
NewErrorWithMessage
(
errDecodeArgs
,
"Transaction index does not exist"
)
}
*
reply
=
v
.
Transactions
[
args
.
Tx
Index
]
*
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
.
Tx
Index
<
0
{
if
args
.
Index
>
int64
(
len
(
v
.
Transactions
))
||
args
.
Index
<
0
{
return
NewErrorWithMessage
(
errDecodeArgs
,
"Transaction index does not exist"
)
}
*
reply
=
v
.
Transactions
[
args
.
Tx
Index
]
*
reply
=
v
.
Transactions
[
args
.
Index
]
case
"eth_getUncleByBlockHashAndIndex"
:
case
"eth_getUncleByBlockNumberAndIndex"
:
return
errNotImplemented
...
...
rpc/args.go
View file @
d465e410
...
...
@@ -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
{
...
...
rpc/responses.go
View file @
d465e410
...
...
@@ -2,6 +2,7 @@ package rpc
import
(
"encoding/json"
// "fmt"
"math/big"
"github.com/ethereum/go-ethereum/core/types"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment