Skip to content

Commit

Permalink
Merge pull request #1776 from tronprotocol/dbversion_default_2
Browse files Browse the repository at this point in the history
db.version default 2
  • Loading branch information
Yrp authored Nov 28, 2018
2 parents f24e586 + 753482c commit 607f1ca
Show file tree
Hide file tree
Showing 3 changed files with 303 additions and 283 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/tron/core/config/args/Args.java
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,8 @@ private static void logConfig() {
logger.info("Backup priority: {}", args.getBackupPriority());
logger.info("************************ Code version *************************");
logger.info("Code version : {}", Version.getVersion());
logger.info("************************ DB config *************************");
logger.info("DB version : {}", args.getStorage().getDbVersion());
logger.info("***************************************************************");
logger.info("\n");
}
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/org/tron/core/config/args/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@

import com.typesafe.config.Config;
import com.typesafe.config.ConfigObject;

import org.apache.commons.lang3.StringUtils;
import org.iq80.leveldb.CompressionType;
import org.iq80.leveldb.Options;

import java.io.File;
import java.util.Map;
import java.util.stream.Collectors;

import org.tron.common.utils.FileUtil;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.iq80.leveldb.CompressionType;
import org.iq80.leveldb.Options;
import org.tron.common.utils.FileUtil;

/**
* Custom storage configurations
Expand Down Expand Up @@ -64,7 +60,7 @@ public class Storage {
/**
* Default values of directory
*/
private static final int DEFAULT_DB_VERSION = 1;
private static final int DEFAULT_DB_VERSION = 2;
private static final String DEFAULT_DB_DIRECTORY = "database";
private static final String DEFAULT_INDEX_DIRECTORY = "index";
private static final String DEFAULT_INDEX_SWTICH = "on";
Expand Down
Loading

0 comments on commit 607f1ca

Please sign in to comment.