code: func (tab *Table) add(n *Node) (contested *Node) {
  	//fmt.Println("add", n.addr().String(), n.ID.String(), n.sha.Hex())
  	if n.ID == tab.self.ID {
  		return
  	}
  	b := tab.buckets[logdist(tab.self.sha, n.sha)]
  	switch {
  	case b.bump(n):
  		// n exists in b.
  		return nil
  	case len(b.entries) < bucketSize:
  		// b has space available.
  		b.addFront(n)
  		tab.count++
  		if tab.nodeAddedHook != nil {
  			tab.nodeAddedHook(n)
  		}
  		return nil
  	default:
  		// b has no space left, add to replacement cache
  		// and revalidate the last entry.
  		// TODO: drop previous node
  		b.replacements = append(b.replacements, n)
  		if len(b.replacements) > bucketSize {
  			copy(b.replacements, b.replacements[1:])
  			b.replacements = b.replacements[:len(b.replacements)-1]
  		}
  		return b.entries[len(b.entries)-1]
  	}
  }
docs: // add attempts to add the given node its corresponding bucket. If the
  // bucket has space available, adding the node succeeds immediately.
  // Otherwise, the node is added to the replacement cache for the bucket.