public void copyCheckpointsFromInstallationDirectory(String destinationCheckpointsFilename) throws IOException {
  if (destinationCheckpointsFilename == null) {
    return;
  }
  File destinationCheckpoints=new File(destinationCheckpointsFilename);
  if (!destinationCheckpoints.exists()) {
    File directory=new File(".");
    String currentWorkingDirectory=directory.getCanonicalPath();
    String filePrefix=MultiBitService.getFilePrefix();
    String checkpointsFilename=filePrefix + MultiBitService.CHECKPOINTS_SUFFIX;
    String sourceCheckpointsFilename=currentWorkingDirectory + File.separator + checkpointsFilename;
    File sourceBlockcheckpoints=new File(sourceCheckpointsFilename);
    if (sourceBlockcheckpoints.exists() && !destinationCheckpointsFilename.equals(sourceCheckpointsFilename)) {
      log.info("Copying checkpoints from '" + sourceCheckpointsFilename + "' to '"+ destinationCheckpointsFilename+ "'");
      copyFile(sourceBlockcheckpoints,destinationCheckpoints);
      long sourceLength=sourceBlockcheckpoints.length();
      long destinationLength=destinationCheckpoints.length();
      if (sourceLength != destinationLength) {
        String errorText="Checkpoints were not copied to user's application data directory correctly.\nThe source checkpoints '" + sourceCheckpointsFilename + "' is of length "+ sourceLength+ "\nbut the destination checkpoints '"+ destinationCheckpointsFilename+ "' is of length "+ destinationLength;
        log.error(errorText);
        throw new FileHandlerException(errorText);
      }
    }
  }
}

public void copyCheckpointsFromInstallationDirectory ( String destinationCheckpointsFilename ) throws IOException { if ( destinationCheckpointsFilename == null ) { return ; } File destinationCheckpoints = new File ( destinationCheckpointsFilename ) ; if ( ! destinationCheckpoints . exists ( ) ) { File directory = new File ( "." ) ; String currentWorkingDirectory = directory . getCanonicalPath ( ) ; String filePrefix = MultiBitService . getFilePrefix ( ) ; String checkpointsFilename = filePrefix + MultiBitService . CHECKPOINTS_SUFFIX ; String sourceCheckpointsFilename = currentWorkingDirectory + File . separator + checkpointsFilename ; File sourceBlockcheckpoints = new File ( sourceCheckpointsFilename ) ; if ( sourceBlockcheckpoints . exists ( ) && ! destinationCheckpointsFilename . equals ( sourceCheckpointsFilename ) ) { log . info ( "Copying checkpoints from '" + sourceCheckpointsFilename + "' to '" + destinationCheckpointsFilename + "'" ) ; copyFile ( sourceBlockcheckpoints , destinationCheckpoints ) ; long sourceLength = sourceBlockcheckpoints . length ( ) ; long destinationLength = destinationCheckpoints . length ( ) ; if ( sourceLength != destinationLength ) { String errorText = "Checkpoints were not copied to user's application data directory correctly.\nThe source checkpoints '" + sourceCheckpointsFilename + "' is of length " + sourceLength + "\nbut the destination checkpoints '" + destinationCheckpointsFilename + "' is of length " + destinationLength ; log . error ( errorText ) ; throw new FileHandlerException ( errorText ) ; } } } }
to support multiple users on the same machine , the checkpoints file is installed into the program installation directory and is then copied to the user ' s application data directory when multibit is first used . thus each user has their own copy of the blockchain .
