code: func (m *txSortedMap) Flatten() types.Transactions {
  	// If the sorting was not cached yet, create and cache it
  	if m.cache == nil {
  		m.cache = make(types.Transactions, 0, len(m.items))
  		for _, tx := range m.items {
  			m.cache = append(m.cache, tx)
  		}
  		sort.Sort(types.TxByNonce(m.cache))
  	}
  	// Copy the cache to prevent accidental modifications
  	txs := make(types.Transactions, len(m.cache))
  	copy(txs, m.cache)
  	return txs
  }
docs: // Flatten creates a nonce-sorted slice of transactions based on the loosely
  // sorted internal representation. The result of the sorting is cached in case
  // it's requested again before any modifications are made to the contents.