code: func (p *MemoryPool) HistoryIterator() *HistoryIterator {
  	p.mutex.Lock()
  	defer p.mutex.Unlock()
  
  	keys := make([]string, len(p.history))
  	i := 0
  	for k := range p.history {
  		keys[i] = k
  		i++
  	}
  
  	return &HistoryIterator{pool: p, keys: keys, current: 0}
  }
docs: // HistoryIterator creates a new HistoryIterator for iterating through the transaction history.