MCPcopy Create free account
hub / github.com/CPChain/chain / stats

Method stats

core/tx_pool.go:601–611  ·  view source on GitHub ↗

stats retrieves the current pool stats, namely the number of pending and the number of queued (non-executable) transactions.

()

Source from the content-addressed store, hash-verified

599// stats retrieves the current pool stats, namely the number of pending and the
600// number of queued (non-executable) transactions.
601func (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.

Callers 3

loopMethod · 0.95
StatsMethod · 0.95
validateTxPoolInternalsFunction · 0.80

Calls 1

LenMethod · 0.65

Tested by 1

validateTxPoolInternalsFunction · 0.64