aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-29 16:14:56 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-05-29 16:17:31 +0800
commit673c92db6bcb56420a97d433dae2d807911ffbb9 (patch)
treea1094d7cbf92fce4d9142530189633fa800dc617 /internal
parentcb809c03da18bf45f961a931dfd4c765de144e66 (diff)
downloadgo-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar.gz
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar.bz2
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar.lz
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar.xz
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.tar.zst
go-tangerine-673c92db6bcb56420a97d433dae2d807911ffbb9.zip
internal/ethapi: fix tx nonces in pool inspect/content
Diffstat (limited to 'internal')
-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
}