code: func (k *Kademlia) Register(peers ...*BzzAddr) error {
  	k.lock.Lock()
  	defer k.lock.Unlock()
  	var known, size int
  	for _, p := range peers {
  		log.Trace("kademlia trying to register", "addr", p)
  		// error if self received, peer should know better
  		// and should be punished for this
  		if bytes.Equal(p.Address(), k.base) {
  			return fmt.Errorf("add peers: %x is self", k.base)
  		}
  		var found bool
  		k.addrs, _, found, _ = pot.Swap(k.addrs, p, Pof, func(v pot.Val) pot.Val {
  			// if not found
  			if v == nil {
  				log.Trace("registering new peer", "addr", p)
  				// insert new offline peer into conns
  				return newEntry(p)
  			}
  
  			e := v.(*entry)
  
  			// if underlay address is different, still add
  			if !bytes.Equal(e.BzzAddr.UAddr, p.UAddr) {
  				log.Trace("underlay addr is different, so add again", "new", p, "old", e.BzzAddr)
  				// insert new offline peer into conns
  				return newEntry(p)
  			}
  
  			log.Trace("found among known peers, underlay addr is same, do nothing", "new", p, "old", e.BzzAddr)
  
  			return v
  		})
  		if found {
  			known++
  		}
  		size++
  	}
  	// send new address count value only if there are new addresses
  	if k.addrCountC != nil && size-known > 0 {
  		k.addrCountC <- k.addrs.Size()
  	}
  
  	k.sendNeighbourhoodDepthChange()
  	return nil
  }
docs: // Register enters each address as kademlia peer record into the
  // database of known peer addresses