code: func (t *Transport) AddPeer(id uint64, addr string) error {
  	t.mu.Lock()
  	defer t.mu.Unlock()
  	if t.stopped {
  		return errors.New("transport stopped")
  	}
  	if ep, ok := t.peers[id]; ok {
  		if ep.address() == addr {
  			return nil
  		}
  		return errors.Errorf("peer %x already added with addr %s", id, ep.addr)
  	}
  	log.G(t.ctx).Debugf("transport: add peer %x with address %s", id, addr)
  	p, err := newPeer(id, addr, t)
  	if err != nil {
  		return errors.Wrapf(err, "failed to create peer %x with addr %s", id, addr)
  	}
  	t.peers[id] = p
  	return nil
  }
docs: // AddPeer adds new peer with id and address addr to Transport.
  // If there is already peer with such id in Transport it will return error if
  // address is different (UpdatePeer should be used) or nil otherwise.