diff --git a/core/src/main/java/bisq/core/dao/burningman/accounting/storage/BurningManAccountingStoreService.java b/core/src/main/java/bisq/core/dao/burningman/accounting/storage/BurningManAccountingStoreService.java index 620cf42722..98aa41a7ba 100644 --- a/core/src/main/java/bisq/core/dao/burningman/accounting/storage/BurningManAccountingStoreService.java +++ b/core/src/main/java/bisq/core/dao/burningman/accounting/storage/BurningManAccountingStoreService.java @@ -24,14 +24,19 @@ import bisq.core.dao.burningman.accounting.exceptions.BlockHeightNotConnectingEx import bisq.network.p2p.storage.persistence.ResourceDataStoreService; import bisq.network.p2p.storage.persistence.StoreService; +import bisq.common.UserThread; import bisq.common.config.Config; +import bisq.common.file.FileUtil; import bisq.common.persistence.PersistenceManager; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; +import java.nio.file.Path; + import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -43,7 +48,7 @@ import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton public class BurningManAccountingStoreService extends StoreService { - private static final String FILE_NAME = "BurningManAccountingStore"; + private static final String FILE_NAME = "BurningManAccountingStore_v2"; @Inject public BurningManAccountingStoreService(ResourceDataStoreService resourceDataStoreService, @@ -54,6 +59,19 @@ public class BurningManAccountingStoreService extends StoreService { + try { + // Delete old BurningManAccountingStore file which was missing some data. + FileUtil.deleteFileIfExists(Path.of(absolutePathOfStorageDir, "BurningManAccountingStore").toFile()); + } catch (IOException e) { + throw new RuntimeException(e); + } + }, 5); + } + /////////////////////////////////////////////////////////////////////////////////////////// // API @@ -100,7 +118,7 @@ public class BurningManAccountingStoreService extends StoreService