core: fix panic when stat-ing a tx from a queue-only account (#15714)

This commit is contained in:
Péter Szilágyi
2017-12-20 12:34:43 +02:00
committed by GitHub
parent 50df2b78be
commit 5e1581c2c3
2 changed files with 58 additions and 1 deletions

View File

@ -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