Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db.version default 2 #1776

Merged
merged 3 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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