mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 06:47:54 +01:00
WalletAppKit: Always use provideBlockStore() to simplify using a different block store when needed.
This commit is contained in:
parent
f74d155ceb
commit
53bd04e426
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue