Skip to content

Commit

Permalink
Rename HISTORY to HISTORICAL_RESOURCE_FILE_VERSION_TAGS to make its u…
Browse files Browse the repository at this point in the history
…sage more clear
  • Loading branch information
chimp1984 authored and ripcurlx committed Oct 21, 2020
1 parent 8bb1c61 commit 108ca75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions common/src/main/java/bisq/common/app/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ public class Version {
public static final String VERSION = "1.4.1";

/**
* Holds a list of the versions of tagged resource files for optimizing the getData requests.
* Holds a list of the tagged resource files for optimizing the getData requests.
* This must not contain each version but only those where we add new version-tagged resource files for
* historical data stores.
*/
public static final List<String> HISTORY = Arrays.asList("1.4.0");
public static final List<String> HISTORICAL_RESOURCE_FILE_VERSION_TAGS = Arrays.asList("1.4.0");

public static int getMajorVersion(String version) {
return getSubVersion(version, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected void readFromResources(String postFix) {
ImmutableMap.Builder<P2PDataStorage.ByteArray, PersistableNetworkPayload> allHistoricalPayloadsBuilder = ImmutableMap.builder();
ImmutableMap.Builder<String, PersistableNetworkPayloadStore<? extends PersistableNetworkPayload>> storesByVersionBuilder = ImmutableMap.builder();

Version.HISTORY.forEach(version -> readHistoricalStoreFromResources(version, postFix, allHistoricalPayloadsBuilder, storesByVersionBuilder));
Version.HISTORICAL_RESOURCE_FILE_VERSION_TAGS.forEach(version -> readHistoricalStoreFromResources(version, postFix, allHistoricalPayloadsBuilder, storesByVersionBuilder));

allHistoricalPayloads = allHistoricalPayloadsBuilder.build();
storesByVersion = storesByVersionBuilder.build();
Expand Down

0 comments on commit 108ca75

Please sign in to comment.