public PostgresFullPrunedBlockStore(NetworkParameters params,int fullStoreDepth,String hostname,String dbName,String username,String password) throws BlockStoreException {
  this.params=params;
  this.fullStoreDepth=fullStoreDepth;
  connectionURL="jdbc:postgresql://" + hostname + "/"+ dbName;
  this.username=username;
  this.password=password;
  conn=new ThreadLocal<Connection>();
  allConnections=new LinkedList<Connection>();
  try {
    Class.forName(driver);
    log.info(driver + " loaded. ");
  }
 catch (  java.lang.ClassNotFoundException e) {
    log.error("check CLASSPATH for Postgres jar ",e);
  }
  maybeConnect();
  try {
    if (!tableExists("settings"))     createTables();
    initFromDatabase();
  }
 catch (  SQLException e) {
    throw new BlockStoreException(e);
  }
}

public PostgresFullPrunedBlockStore ( NetworkParameters params , int fullStoreDepth , String hostname , String dbName , String username , String password ) throws BlockStoreException { this . params = params ; this . fullStoreDepth = fullStoreDepth ; connectionURL = "jdbc:postgresql://" + hostname + "/" + dbName ; this . username = username ; this . password = password ; conn = new ThreadLocal < Connection > ( ) ; allConnections = new LinkedList < Connection > ( ) ; try { Class . forName ( driver ) ; log . info ( driver + " loaded. " ) ; } catch ( java . lang . ClassNotFoundException e ) { log . error ( "check CLASSPATH for Postgres jar " , e ) ; } maybeConnect ( ) ; try { if ( ! tableExists ( "settings" ) ) createTables ( ) ; initFromDatabase ( ) ; } catch ( SQLException e ) { throw new BlockStoreException ( e ) ; } }
creates a new postgresfullprunedblockstore .
