WalletAppKit: Always use provideBlockStore() to simplify using a different block store when needed.
@@ -317,7 +317,7 @@ public class WalletAppKit extends AbstractIdleService {
vStore.close();
if (!chainFile.delete())
throw new IOException("Failed to delete chain file in preparation for restore.");
- vStore = new SPVBlockStore(params, chainFile);
+ vStore = provideBlockStore(chainFile);
}
} else if (restoreFromKey != null) {
time = restoreFromKey.getCreationTimeSeconds();
@@ -326,7 +326,7 @@ public class WalletAppKit extends AbstractIdleService {
vStore.close();
if (!chainFile.delete())
throw new IOException("Failed to delete chain file in preparation for restore.");
- vStore = new SPVBlockStore(params, chainFile);
+ vStore = provideBlockStore(chainFile);
}
}
else
@@ -342,7 +342,7 @@ public class WalletAppKit extends AbstractIdleService {
vStore.close();
if (!chainFile.delete())
throw new IOException("Failed to delete chain file in preparation for restore.");
- vStore = new SPVBlockStore(params, chainFile);
+ vStore = provideBlockStore(chainFile);
}
}
vChain = new BlockChain(params, vStore);
