code: func (a *AddrManager) getAddresses() []*wire.NetAddress {
  	a.mtx.Lock()
  	defer a.mtx.Unlock()
  
  	addrIndexLen := len(a.addrIndex)
  	if addrIndexLen == 0 {
  		return nil
  	}
  
  	addrs := make([]*wire.NetAddress, 0, addrIndexLen)
  	for _, v := range a.addrIndex {
  		addrs = append(addrs, v.na)
  	}
  
  	return addrs
  }
docs: // getAddresses returns all of the addresses currently found within the
  // manager's address cache.