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
6c959207
Commit
6c959207
authored
8 years ago
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
internal/ethapi: bugfix gas price and limit swapped in eth_resend
parent
a7cc3248
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
api.go
internal/ethapi/api.go
+3
-4
No files found.
internal/ethapi/api.go
View file @
6c959207
...
...
@@ -1170,8 +1170,7 @@ func (s *PublicTransactionPoolAPI) PendingTransactions() []*RPCTransaction {
// Resend accepts an existing transaction and a new gas price and limit. It will remove the given transaction from the
// pool and reinsert it with the new gas price and limit.
func
(
s
*
PublicTransactionPoolAPI
)
Resend
(
ctx
context
.
Context
,
tx
*
Tx
,
gasPrice
,
gasLimit
*
rpc
.
HexNumber
)
(
common
.
Hash
,
error
)
{
func
(
s
*
PublicTransactionPoolAPI
)
Resend
(
ctx
context
.
Context
,
tx
Tx
,
gasPrice
,
gasLimit
*
rpc
.
HexNumber
)
(
common
.
Hash
,
error
)
{
pending
:=
s
.
b
.
GetPoolTransactions
()
for
_
,
p
:=
range
pending
{
if
pFrom
,
err
:=
p
.
FromFrontier
();
err
==
nil
&&
pFrom
==
tx
.
From
&&
p
.
SigHash
()
==
tx
.
tx
.
SigHash
()
{
...
...
@@ -1184,9 +1183,9 @@ func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, tx *Tx, gasPrice,
var
newTx
*
types
.
Transaction
if
tx
.
tx
.
To
()
==
nil
{
newTx
=
types
.
NewContractCreation
(
tx
.
tx
.
Nonce
(),
tx
.
tx
.
Value
(),
gas
Price
.
BigInt
(),
gasLimit
.
BigInt
(),
tx
.
tx
.
Data
())
newTx
=
types
.
NewContractCreation
(
tx
.
tx
.
Nonce
(),
tx
.
tx
.
Value
(),
gas
Limit
.
BigInt
(),
gasPrice
.
BigInt
(),
tx
.
tx
.
Data
())
}
else
{
newTx
=
types
.
NewTransaction
(
tx
.
tx
.
Nonce
(),
*
tx
.
tx
.
To
(),
tx
.
tx
.
Value
(),
gas
Price
.
BigInt
(),
gasLimit
.
BigInt
(),
tx
.
tx
.
Data
())
newTx
=
types
.
NewTransaction
(
tx
.
tx
.
Nonce
(),
*
tx
.
tx
.
To
(),
tx
.
tx
.
Value
(),
gas
Limit
.
BigInt
(),
gasPrice
.
BigInt
(),
tx
.
tx
.
Data
())
}
signedTx
,
err
:=
s
.
sign
(
tx
.
From
,
newTx
)
...
...
This diff is collapsed.
Click to expand it.
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