From 93ecc6e93c14dd8bd351b336efb22a45a890cea7 Mon Sep 17 00:00:00 2001 From: barryz Date: Mon, 31 May 2021 16:51:50 +0800 Subject: [PATCH] fix ContentByAccount pending and queued --- core/tx_pool.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/tx_pool.go b/core/tx_pool.go index 6e29bd5079..adc631c959 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -489,16 +489,14 @@ func (pool *TxPool) ContentByAccount(addr common.Address) (pending, queued types defer pool.mu.Unlock() list, ok := pool.pending[addr] - if !ok { - return nil, nil + if ok { + pending = list.Flatten() } - pending = list.Flatten() list, ok = pool.queue[addr] - if !ok { - return nil, nil + if ok { + queued = list.Flatten() } - queued = list.Flatten() return }