mirror of
https://github.com/Qortal/qortal.git
synced 2025-05-05 17:27:52 +00:00
Added "archiveVersion" setting, which specifies the archive version to be used when building. Defaults to 1 for now, but will bump to version 2 at the time of a wider rollout.
This commit is contained in:
parent
e1771dbaea
commit
d54006caf7
@ -80,7 +80,7 @@ public class BlockArchiveWriter {
|
|||||||
* @param repository
|
* @param repository
|
||||||
*/
|
*/
|
||||||
public BlockArchiveWriter(int startHeight, int endHeight, Repository repository) {
|
public BlockArchiveWriter(int startHeight, int endHeight, Repository repository) {
|
||||||
this(startHeight, endHeight, 2, Paths.get(Settings.getInstance().getRepositoryPath(), "archive"), repository);
|
this(startHeight, endHeight, Settings.getInstance().getArchiveVersion(), Paths.get(Settings.getInstance().getRepositoryPath(), "archive"), repository);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMaxArchiveHeight(Repository repository) throws DataException {
|
public static int getMaxArchiveHeight(Repository repository) throws DataException {
|
||||||
|
@ -178,6 +178,8 @@ public class Settings {
|
|||||||
private boolean archiveEnabled = true;
|
private boolean archiveEnabled = true;
|
||||||
/** How often to attempt archiving (ms). */
|
/** How often to attempt archiving (ms). */
|
||||||
private long archiveInterval = 7171L; // milliseconds
|
private long archiveInterval = 7171L; // milliseconds
|
||||||
|
/** Serialization version to use when building an archive */
|
||||||
|
private int archiveVersion = 1;
|
||||||
|
|
||||||
|
|
||||||
/** Whether to automatically bootstrap instead of syncing from genesis */
|
/** Whether to automatically bootstrap instead of syncing from genesis */
|
||||||
@ -926,6 +928,10 @@ public class Settings {
|
|||||||
return this.archiveInterval;
|
return this.archiveInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getArchiveVersion() {
|
||||||
|
return this.archiveVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean getBootstrap() {
|
public boolean getBootstrap() {
|
||||||
return this.bootstrap;
|
return this.bootstrap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user