WalletAppKit: remove unnecessary try/catch in startUp()

Remove the very long try/catch in startup that catches BlockStoreException
and rethrows it wrapped in an IOException.

The Guava service base class (`AbstractIdleService`) that we are extending
allows us to throw `Exception` so there is no reason to wrap the exception
and it can just be thrown directly.
This commit is contained in:
Sean Gilligan 2022-07-27 12:36:52 -07:00
parent 54cd676560
commit 4bd79448ee

View File

@ -318,7 +318,7 @@ public class WalletAppKit extends AbstractIdleService {
}
}
log.info("Starting up with directory = {}", directory);
try {
File chainFile = new File(directory, filePrefix + ".spvchain");
boolean chainFileExists = chainFile.exists();
vWalletFile = new File(directory, filePrefix + ".wallet");
@ -398,9 +398,6 @@ public class WalletAppKit extends AbstractIdleService {
}
});
}
} catch (BlockStoreException e) {
throw new IOException(e);
}
}
private Wallet createOrLoadWallet(boolean shouldReplayWallet) throws Exception {