aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-12-20 18:34:43 +0800
committerGitHub <noreply@github.com>2017-12-20 18:34:43 +0800
commit5e1581c2c3a88754f5f492b8551a96c2f5d4664a (patch)
tree30b150686968fa75c97ddc99cbf70032b4ffd3fd /core/tx_pool.go
parent50df2b78be038fceb6975582a5f07052de939cbc (diff)
downloadgo-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar.gz
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar.bz2
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar.lz
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar.xz
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.tar.zst
go-tangerine-5e1581c2c3a88754f5f492b8551a96c2f5d4664a.zip
core: fix panic when stat-ing a tx from a queue-only account (#15714)
Diffstat (limited to 'core/tx_pool.go')
-rw-r--r--core/tx_pool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tx_pool.go b/core/tx_pool.go
index c3915575b..541004300 100644
--- a/core/tx_pool.go
+++ b/core/tx_pool.go
@@ -838,7 +838,7 @@ func (pool *TxPool) Status(hashes []common.Hash) []TxStatus {
for i, hash := range hashes {
if tx := pool.all[hash]; tx != nil {
from, _ := types.Sender(pool.signer, tx) // already validated
- if pool.pending[from].txs.items[tx.Nonce()] != nil {
+ if pool.pending[from] != nil && pool.pending[from].txs.items[tx.Nonce()] != nil {
status[i] = TxStatusPending
} else {
status[i] = TxStatusQueued