Skip to content

Commit

Permalink
Deactivate usage of HistoricalDataStoreService for now.
Browse files Browse the repository at this point in the history
This is intended to be able to merge the code base before #4577 is merged.
We can add the code base but not using the feature yet. Once we are ready for deployment we can revert this commit and have the feature activated.
  • Loading branch information
chimp1984 committed Oct 1, 2020
1 parent 8ea6da0 commit 6f5bfde
Showing 1 changed file with 14 additions and 2 deletions.
Expand Up @@ -17,8 +17,9 @@

package bisq.core.trade.statistics;

import bisq.network.p2p.storage.P2PDataStorage;
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
import bisq.network.p2p.storage.persistence.HistoricalDataStoreService;
import bisq.network.p2p.storage.persistence.MapStoreService;

import bisq.common.config.Config;
import bisq.common.storage.Storage;
Expand All @@ -28,10 +29,12 @@

import java.io.File;

import java.util.Map;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class TradeStatistics2StorageService extends HistoricalDataStoreService<TradeStatistics2Store> {
public class TradeStatistics2StorageService extends MapStoreService<TradeStatistics2Store, PersistableNetworkPayload> {
private static final String FILE_NAME = "TradeStatistics2Store";


Expand All @@ -55,6 +58,15 @@ public String getFileName() {
return FILE_NAME;
}

@Override
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
return store.getMap();
}

public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMapOfAllData() {
return getMap();
}

@Override
public boolean canHandle(PersistableNetworkPayload payload) {
return payload instanceof TradeStatistics2;
Expand Down

0 comments on commit 6f5bfde

Please sign in to comment.