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

Struct txSortedMap

core/tx_list.go:72–76  ·  view source on GitHub ↗

txSortedMap is a nonce->transaction hash map with a heap based index to allow iterating over the contents in a nonce-incrementing way.

Source from the content-addressed store, hash-verified

70// txSortedMap is a nonce->transaction hash map with a heap based index to allow
71// iterating over the contents in a nonce-incrementing way.
72type txSortedMap struct {
73 items map[uint64]*TimedTransaction // Hash map storing the transaction data
74 index *nonceHeap // Heap of nonces of all the stored transactions (non-strict mode)
75 cache types.Transactions // Cache of the transactions already sorted
76}
77
78// newTxSortedMap creates a new nonce-sorted transaction map.
79func newTxSortedMap() *txSortedMap {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected