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
6fdddc5a
Commit
6fdddc5a
authored
Jun 29, 2015
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved error handling in parsing request
parent
02c6af66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
eth.go
rpc/api/eth.go
+2
-1
eth_args.go
rpc/api/eth_args.go
+6
-1
No files found.
rpc/api/eth.go
View file @
6fdddc5a
...
...
@@ -12,6 +12,7 @@ import (
"github.com/ethereum/go-ethereum/rpc/shared"
"github.com/ethereum/go-ethereum/xeth"
"gopkg.in/fatih/set.v0"
"fmt"
)
const
(
...
...
@@ -574,7 +575,7 @@ func (self *ethApi) Resend(req *shared.Request) (interface{}, error) {
func
(
self
*
ethApi
)
PendingTransactions
(
req
*
shared
.
Request
)
(
interface
{},
error
)
{
txs
:=
self
.
ethereum
.
TxPool
()
.
GetTransactions
()
// grab the accounts from the account manager. This will help with determ
e
ning which
// grab the accounts from the account manager. This will help with determ
i
ning which
// transactions should be returned.
accounts
,
err
:=
self
.
ethereum
.
AccountManager
()
.
Accounts
()
if
err
!=
nil
{
...
...
rpc/api/eth_args.go
View file @
6fdddc5a
...
...
@@ -917,7 +917,11 @@ func (args *ResendArgs) UnmarshalJSON(b []byte) (err error) {
trans
:=
new
(
tx
)
err
=
json
.
Unmarshal
(
data
,
trans
)
if
err
!=
nil
{
return
shared
.
NewDecodeParamError
(
"Unable to parse transaction object."
)
return
shared
.
NewDecodeParamError
(
"Unable to parse transaction object"
)
}
if
trans
==
nil
||
trans
.
tx
==
nil
{
return
shared
.
NewDecodeParamError
(
"Unable to parse transaction object"
)
}
gasLimit
,
gasPrice
:=
trans
.
GasLimit
,
trans
.
GasPrice
...
...
@@ -936,6 +940,7 @@ func (args *ResendArgs) UnmarshalJSON(b []byte) (err error) {
return
shared
.
NewInvalidTypeError
(
"gasLimit"
,
"not a string"
)
}
}
args
.
Tx
=
trans
args
.
GasPrice
=
gasPrice
args
.
GasLimit
=
gasLimit
...
...
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