use of org.ethereum.db.StateSource in project nuls by nuls-io.
the class CommonConfig method stateSource.
public StateSource stateSource() {
if (this.stateSource == null) {
// fastSyncCleanUp();
StateSource stateSource = new StateSource(blockchainSource("state"), systemProperties().databasePruneDepth() >= 0);
dbFlushManager().addCache(stateSource.getWriteCache());
this.stateSource = stateSource;
}
return this.stateSource;
}
use of org.ethereum.db.StateSource in project nuls by nuls-io.
the class ProgramExecutorImpl method stateSource.
private static Source<byte[], byte[]> stateSource(DBService dbService) {
LevelDbDataSource.dbService = dbService;
SystemProperties config = SystemProperties.getDefault();
CommonConfig commonConfig = CommonConfig.getDefault();
StateSource stateSource = commonConfig.stateSource();
stateSource.setConfig(config);
stateSource.setCommonConfig(commonConfig);
return stateSource;
}
Aggregations