aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-29 16:37:34 +0800
committerGitHub <noreply@github.com>2017-05-29 16:37:34 +0800
commitae40d51410f6fa958d08cd34f9e8586edb88fdf1 (patch)
treec1a13a061f1bcaa174267e0462c85258907a8786
parentb865fad888016a1777b6d6ea66061799cf12c135 (diff)
parent673c92db6bcb56420a97d433dae2d807911ffbb9 (diff)
downloadgo-tangerine-ae40d51410f6fa958d08cd34f9e8586edb88fdf1.tar.gz
go-tangerine-ae40d51410f6fa958d08cd34f9e8586edb88fdf1.tar.zst
go-tangerine-ae40d51410f6fa958d08cd34f9e8586edb88fdf1.zip
Merge pull request #14539 from karalabe/txpool-inspec-nonces
internal/ethapi: fix tx nonces in pool inspect/content
-rw-r--r--internal/ethapi/api.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index a22c15eca..cab33c191 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -118,16 +118,16 @@ func (s *PublicTxPoolAPI) Content() map[string]map[string]map[string]*RPCTransac
// Flatten the pending transactions
for account, txs := range pending {
dump := make(map[string]*RPCTransaction)
- for nonce, tx := range txs {
- dump[fmt.Sprintf("%d", nonce)] = newRPCPendingTransaction(tx)
+ for _, tx := range txs {
+ dump[fmt.Sprintf("%d", tx.Nonce())] = newRPCPendingTransaction(tx)
}
content["pending"][account.Hex()] = dump
}
// Flatten the queued transactions
for account, txs := range queue {
dump := make(map[string]*RPCTransaction)
- for nonce, tx := range txs {
- dump[fmt.Sprintf("%d", nonce)] = newRPCPendingTransaction(tx)
+ for _, tx := range txs {
+ dump[fmt.Sprintf("%d", tx.Nonce())] = newRPCPendingTransaction(tx)
}
content["queued"][account.Hex()] = dump
}
@@ -162,16 +162,16 @@ func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string]string {
// Flatten the pending transactions
for account, txs := range pending {
dump := make(map[string]string)
- for nonce, tx := range txs {
- dump[fmt.Sprintf("%d", nonce)] = format(tx)
+ for _, tx := range txs {
+ dump[fmt.Sprintf("%d", tx.Nonce())] = format(tx)
}
content["pending"][account.Hex()] = dump
}
// Flatten the queued transactions
for account, txs := range queue {
dump := make(map[string]string)
- for nonce, tx := range txs {
- dump[fmt.Sprintf("%d", nonce)] = format(tx)
+ for _, tx := range txs {
+ dump[fmt.Sprintf("%d", tx.Nonce())] = format(tx)
}
content["queued"][account.Hex()] = dump
}