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
2628103f
Commit
2628103f
authored
Jun 15, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc/api: fixed default gas-(price) issue.
parent
e79cc42d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
eth.go
rpc/api/eth.go
+8
-1
eth_args.go
rpc/api/eth_args.go
+2
-6
No files found.
rpc/api/eth.go
View file @
2628103f
...
...
@@ -259,7 +259,14 @@ func (self *ethApi) SendTransaction(req *shared.Request) (interface{}, error) {
nonce
=
args
.
Nonce
.
String
()
}
v
,
err
:=
self
.
xeth
.
Transact
(
args
.
From
,
args
.
To
,
nonce
,
args
.
Value
.
String
(),
args
.
Gas
.
String
(),
args
.
GasPrice
.
String
(),
args
.
Data
)
var
gas
,
price
string
if
args
.
Gas
!=
nil
{
gas
=
args
.
Gas
.
String
()
}
if
args
.
GasPrice
!=
nil
{
price
=
args
.
GasPrice
.
String
()
}
v
,
err
:=
self
.
xeth
.
Transact
(
args
.
From
,
args
.
To
,
nonce
,
args
.
Value
.
String
(),
gas
,
price
,
args
.
Data
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
rpc/api/eth_args.go
View file @
2628103f
...
...
@@ -333,9 +333,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Value
=
num
num
=
nil
if
ext
.
Gas
==
nil
{
num
=
big
.
NewInt
(
0
)
}
else
{
if
ext
.
Gas
!=
nil
{
if
num
,
err
=
numString
(
ext
.
Gas
);
err
!=
nil
{
return
err
}
...
...
@@ -343,9 +341,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
args
.
Gas
=
num
num
=
nil
if
ext
.
GasPrice
==
nil
{
num
=
big
.
NewInt
(
0
)
}
else
{
if
ext
.
GasPrice
!=
nil
{
if
num
,
err
=
numString
(
ext
.
GasPrice
);
err
!=
nil
{
return
err
}
...
...
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