code: func mergeCheckpoints(defaultCheckpoints, additional []chaincfg.Checkpoint) []chaincfg.Checkpoint {
  	// Create a map of the additional checkpoints to remove duplicates while
  	// leaving the most recently-specified checkpoint.
  	extra := make(map[int32]chaincfg.Checkpoint)
  	for _, checkpoint := range additional {
  		extra[checkpoint.Height] = checkpoint
  	}
  
  	// Add all default checkpoints that do not have an override in the
  	// additional checkpoints.
  	numDefault := len(defaultCheckpoints)
  	checkpoints := make([]chaincfg.Checkpoint, 0, numDefault+len(extra))
  	for _, checkpoint := range defaultCheckpoints {
  		if _, exists := extra[checkpoint.Height]; !exists {
  			checkpoints = append(checkpoints, checkpoint)
  		}
  	}
  
  	// Append the additional checkpoints and return the sorted results.
  	for _, checkpoint := range extra {
  		checkpoints = append(checkpoints, checkpoint)
  	}
  	sort.Sort(checkpointSorter(checkpoints))
  	return checkpoints
  }
docs: // mergeCheckpoints returns two slices of checkpoints merged into one slice
  // such that the checkpoints are sorted by height.  In the case the additional
  // checkpoints contain a checkpoint with the same height as a checkpoint in the
  // default checkpoints, the additional checkpoint will take precedence and
  // overwrite the default one.