aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-10-06 07:42:42 +0800
committerGitHub <noreply@github.com>2016-10-06 07:42:42 +0800
commit83fc6fdb34f03f0208514cef9bc9b576c5abcfe9 (patch)
tree828cb821aea5f45a1a0dac578c2d223a0aceb7f4
parent2acb9a6ea7ddab541122ede96f2275598ae36931 (diff)
parent6c959207db13866c4935d9434aef13c595024aaf (diff)
downloaddexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar.gz
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar.bz2
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar.lz
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar.xz
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.tar.zst
dexon-83fc6fdb34f03f0208514cef9bc9b576c5abcfe9.zip
Merge pull request #3089 from bas-vk/resend
internal/ethapi: bugfix gas price and limit swapped in eth_resend
-rw-r--r--internal/ethapi/api.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index 9a97be25f..333c39965 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -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(), gasPrice.BigInt(), gasLimit.BigInt(), tx.tx.Data())
+ newTx = types.NewContractCreation(tx.tx.Nonce(), tx.tx.Value(), gasLimit.BigInt(), gasPrice.BigInt(), tx.tx.Data())
} else {
- newTx = types.NewTransaction(tx.tx.Nonce(), *tx.tx.To(), tx.tx.Value(), gasPrice.BigInt(), gasLimit.BigInt(), tx.tx.Data())
+ newTx = types.NewTransaction(tx.tx.Nonce(), *tx.tx.To(), tx.tx.Value(), gasLimit.BigInt(), gasPrice.BigInt(), tx.tx.Data())
}
signedTx, err := s.sign(tx.From, newTx)