mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Use HistoricalDataStoreService for AccountAgeWitnessStorageService
This commit is contained in:
parent
a9eb99c252
commit
17ec32588b
@ -17,9 +17,8 @@
|
||||
|
||||
package bisq.core.account.witness;
|
||||
|
||||
import bisq.network.p2p.storage.P2PDataStorage;
|
||||
import bisq.network.p2p.storage.payload.PersistableNetworkPayload;
|
||||
import bisq.network.p2p.storage.persistence.MapStoreService;
|
||||
import bisq.network.p2p.storage.persistence.HistoricalDataStoreService;
|
||||
|
||||
import bisq.common.config.Config;
|
||||
import bisq.common.persistence.PersistenceManager;
|
||||
@ -29,12 +28,10 @@ import javax.inject.Named;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class AccountAgeWitnessStorageService extends MapStoreService<AccountAgeWitnessStore, PersistableNetworkPayload> {
|
||||
public class AccountAgeWitnessStorageService extends HistoricalDataStoreService<AccountAgeWitnessStore> {
|
||||
private static final String FILE_NAME = "AccountAgeWitnessStore";
|
||||
|
||||
|
||||
@ -48,23 +45,19 @@ public class AccountAgeWitnessStorageService extends MapStoreService<AccountAgeW
|
||||
super(storageDir, persistenceManager);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// API
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@Override
|
||||
protected void initializePersistenceManager() {
|
||||
persistenceManager.initialize(store, PersistenceManager.Source.NETWORK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return FILE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
|
||||
return store.getMap();
|
||||
protected void initializePersistenceManager() {
|
||||
persistenceManager.initialize(store, PersistenceManager.Source.NETWORK);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user