code: func (ra *RegistrationAuthorityImpl) UpdateRegistration(ctx context.Context, base core.Registration, update core.Registration) (core.Registration, error) {
  	if changed := mergeUpdate(&base, update); !changed {
  		// If merging the update didn't actually change the base then our work is
  		// done, we can return before calling ra.SA.UpdateRegistration since theres
  		// nothing for the SA to do
  		return base, nil
  	}
  
  	err := ra.validateContacts(ctx, base.Contact)
  	if err != nil {
  		return core.Registration{}, err
  	}
  
  	err = ra.SA.UpdateRegistration(ctx, base)
  	if err != nil {
  		// berrors.InternalServerError since the user-data was validated before being
  		// passed to the SA.
  		err = berrors.InternalServerError("Could not update registration: %s", err)
  		return core.Registration{}, err
  	}
  
  	ra.stats.Inc("UpdatedRegistrations", 1)
  	return base, nil
  }
docs: // UpdateRegistration updates an existing Registration with new values. Caller
  // is responsible for making sure that update.Key is only different from base.Key
  // if it is being called from the WFE key change endpoint.