stats retrieves the current pool stats, namely the number of pending and the number of queued (non-executable) transactions.
()
| 599 | // stats retrieves the current pool stats, namely the number of pending and the |
| 600 | // number of queued (non-executable) transactions. |
| 601 | func (pool *TxPool) stats() (int, int) { |
| 602 | pending := 0 |
| 603 | for _, list := range pool.pending { |
| 604 | pending += list.Len() |
| 605 | } |
| 606 | queued := 0 |
| 607 | for _, list := range pool.queue { |
| 608 | queued += list.Len() |
| 609 | } |
| 610 | return pending, queued |
| 611 | } |
| 612 | |
| 613 | // Content retrieves the data content of the transaction pool, returning all the |
| 614 | // pending as well as queued transactions, grouped by account and sorted by nonce. |