code: func (r *Record) Set(e Entry) {
  	blob, err := rlp.EncodeToBytes(e)
  	if err != nil {
  		panic(fmt.Errorf("enr: can't encode %s: %v", e.ENRKey(), err))
  	}
  	r.invalidate()
  
  	pairs := make([]pair, len(r.pairs))
  	copy(pairs, r.pairs)
  	i := sort.Search(len(pairs), func(i int) bool { return pairs[i].k >= e.ENRKey() })
  	switch {
  	case i < len(pairs) && pairs[i].k == e.ENRKey():
  		// element is present at r.pairs[i]
  		pairs[i].v = blob
  	case i < len(r.pairs):
  		// insert pair before i-th elem
  		el := pair{e.ENRKey(), blob}
  		pairs = append(pairs, pair{})
  		copy(pairs[i+1:], pairs[i:])
  		pairs[i] = el
  	default:
  		// element should be placed at the end of r.pairs
  		pairs = append(pairs, pair{e.ENRKey(), blob})
  	}
  	r.pairs = pairs
  }
docs: // Set adds or updates the given entry in the record. It panics if the value can't be
  // encoded. If the record is signed, Set increments the sequence number and invalidates
  // the sequence number.