forked from Qortal/qortal
FOLLOWED_AND_VIEWED renamed to FOLLOWED_OR_VIEWED, since it's technically an OR not an AND.
This commit is contained in:
parent
f58a16905f
commit
5ba6f6f53e
@ -102,7 +102,7 @@ public class ArbitraryDataManager extends Thread {
|
||||
// Fetch data according to storage policy
|
||||
switch (Settings.getInstance().getStoragePolicy()) {
|
||||
case FOLLOWED:
|
||||
case FOLLOWED_AND_VIEWED:
|
||||
case FOLLOWED_OR_VIEWED:
|
||||
this.processNames();
|
||||
break;
|
||||
|
||||
|
@ -26,7 +26,7 @@ import java.util.stream.Collectors;
|
||||
public class ArbitraryDataStorageManager extends Thread {
|
||||
|
||||
public enum StoragePolicy {
|
||||
FOLLOWED_AND_VIEWED,
|
||||
FOLLOWED_OR_VIEWED,
|
||||
FOLLOWED,
|
||||
VIEWED,
|
||||
ALL,
|
||||
@ -126,7 +126,7 @@ public class ArbitraryDataStorageManager extends Thread {
|
||||
|
||||
// Check if our storage policy and and lists allow us to host data for this name
|
||||
switch (Settings.getInstance().getStoragePolicy()) {
|
||||
case FOLLOWED_AND_VIEWED:
|
||||
case FOLLOWED_OR_VIEWED:
|
||||
case ALL:
|
||||
case VIEWED:
|
||||
// If the policy includes viewed data, we can host it as long as it's not blocked
|
||||
@ -189,7 +189,7 @@ public class ArbitraryDataStorageManager extends Thread {
|
||||
|
||||
switch (Settings.getInstance().getStoragePolicy()) {
|
||||
case FOLLOWED:
|
||||
case FOLLOWED_AND_VIEWED:
|
||||
case FOLLOWED_OR_VIEWED:
|
||||
return this.isFollowingName(name);
|
||||
|
||||
case ALL:
|
||||
@ -217,7 +217,7 @@ public class ArbitraryDataStorageManager extends Thread {
|
||||
case NONE:
|
||||
case VIEWED:
|
||||
case FOLLOWED:
|
||||
case FOLLOWED_AND_VIEWED:
|
||||
case FOLLOWED_OR_VIEWED:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class ArbitraryDataStoragePolicyTests extends Common {
|
||||
assertTrue(ResourceListManager.getInstance().addToList("followedNames", name, false));
|
||||
|
||||
// We should store and pre-fetch data for this transaction
|
||||
assertEquals(StoragePolicy.FOLLOWED_AND_VIEWED, Settings.getInstance().getStoragePolicy());
|
||||
assertEquals(StoragePolicy.FOLLOWED_OR_VIEWED, Settings.getInstance().getStoragePolicy());
|
||||
assertTrue(storageManager.canStoreData(transactionData));
|
||||
assertTrue(storageManager.shouldPreFetchData(repository, transactionData));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user