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

Method Content

core/tx_pool.go:615–628  ·  view source on GitHub ↗

Content retrieves the data content of the transaction pool, returning all the pending as well as queued transactions, grouped by account and sorted by nonce.

()

Source from the content-addressed store, hash-verified

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.
615func (pool *TxPool) Content() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) {
616 pool.mu.Lock()
617 defer pool.mu.Unlock()
618
619 pending := make(map[common.Address]types.Transactions)
620 for addr, list := range pool.pending {
621 pending[addr] = list.Flatten()
622 }
623 queued := make(map[common.Address]types.Transactions)
624 for addr, list := range pool.queue {
625 queued[addr] = list.Flatten()
626 }
627 return pending, queued
628}
629
630// Pending retrieves all currently processable transactions, groupped by origin
631// account and sorted by nonce. The returned transaction set is a copy and can be

Callers 1

TxPoolContentMethod · 0.45

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
FlattenMethod · 0.45

Tested by

no test coverage detected