fix ContentByAccount pending and queued

This commit is contained in:
barryz 2021-05-31 16:51:50 +08:00
parent 23cf9324cc
commit 93ecc6e93c

View file

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