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

Method local

core/tx_pool.go:650–661  ·  view source on GitHub ↗

local retrieves all currently known local transactions, groupped by origin account and sorted by nonce. The returned transaction set is a copy and can be freely modified by calling code.

()

Source from the content-addressed store, hash-verified

648// account and sorted by nonce. The returned transaction set is a copy and can be
649// freely modified by calling code.
650func (pool *TxPool) local() map[common.Address]types.Transactions {
651 txs := make(map[common.Address]types.Transactions)
652 for addr := range pool.locals.accounts {
653 if pending := pool.getPendingTxList(addr); pending != nil {
654 txs[addr] = append(txs[addr], pending.Flatten()...)
655 }
656 if queued := pool.getQueueTxList(addr); queued != nil {
657 txs[addr] = append(txs[addr], queued.Flatten()...)
658 }
659 }
660 return txs
661}
662
663// validateTx checks whether a transaction is valid according to the consensus
664// rules and adheres to some heuristic limits of the local node (price and size).

Callers 2

NewTxPoolFunction · 0.95
loopMethod · 0.95

Calls 3

getPendingTxListMethod · 0.95
getQueueTxListMethod · 0.95
FlattenMethod · 0.45

Tested by

no test coverage detected