diff --git a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessStorageService.java b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessStorageService.java index 93ab89b0f94..ad5d7449d11 100644 --- a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessStorageService.java +++ b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessStorageService.java @@ -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 java.io.File; -import java.util.Map; - import lombok.extern.slf4j.Slf4j; @Slf4j -public class AccountAgeWitnessStorageService extends MapStoreService { +public class AccountAgeWitnessStorageService extends HistoricalDataStoreService { private static final String FILE_NAME = "AccountAgeWitnessStore"; @@ -48,23 +45,19 @@ public AccountAgeWitnessStorageService(@Named(Config.STORAGE_DIR) File storageDi super(storageDir, persistenceManager); } + /////////////////////////////////////////////////////////////////////////////////////////// // API /////////////////////////////////////////////////////////////////////////////////////////// - @Override - protected void initializePersistenceManager() { - persistenceManager.initialize(store, PersistenceManager.Source.NETWORK); - } - @Override public String getFileName() { return FILE_NAME; } @Override - public Map getMap() { - return store.getMap(); + protected void initializePersistenceManager() { + persistenceManager.initialize(store, PersistenceManager.Source.NETWORK); } @Override diff --git a/desktop/package/macosx/copy_dbs.sh b/desktop/package/macosx/copy_dbs.sh index a9aaacfa903..520841cd2fa 100755 --- a/desktop/package/macosx/copy_dbs.sh +++ b/desktop/package/macosx/copy_dbs.sh @@ -12,6 +12,6 @@ resDir=p2p/src/main/resources # Only commit new TradeStatistics3Store if you plan to add it to # https://github.com/bisq-network/bisq/blob/0345c795e2c227d827a1f239a323dda1250f4e69/common/src/main/java/bisq/common/app/Version.java#L40 as well. cp "$dbDir/TradeStatistics3Store" "$resDir/TradeStatistics3Store_${version}_BTC_MAINNET" -cp "$dbDir/AccountAgeWitnessStore" "$resDir/AccountAgeWitnessStore_BTC_MAINNET" +cp "$dbDir/AccountAgeWitnessStore" "$resDir/AccountAgeWitnessStore_${version}_BTC_MAINNET" cp "$dbDir/DaoStateStore" "$resDir/DaoStateStore_BTC_MAINNET" cp "$dbDir/SignedWitnessStore" "$resDir/SignedWitnessStore_BTC_MAINNET" diff --git a/p2p/src/main/java/bisq/network/p2p/storage/persistence/HistoricalDataStoreService.java b/p2p/src/main/java/bisq/network/p2p/storage/persistence/HistoricalDataStoreService.java index 1eaa34a8bf8..45c744d0b64 100644 --- a/p2p/src/main/java/bisq/network/p2p/storage/persistence/HistoricalDataStoreService.java +++ b/p2p/src/main/java/bisq/network/p2p/storage/persistence/HistoricalDataStoreService.java @@ -192,10 +192,7 @@ private void readHistoricalStoreFromResources(String version, pruneStore(persisted, version); completeHandler.run(); }, - () -> { - log.warn("Resource file with file name {} does not exits.", fileName); - completeHandler.run(); - }); + completeHandler::run); } private void pruneStore(PersistableNetworkPayloadStore historicalStore,