mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Fix nullpointer in constructor
This commit is contained in:
parent
a410da43ad
commit
9fe3bf7510
1 changed files with 17 additions and 13 deletions
|
@ -58,6 +58,10 @@ public class JsonChainStateExporter {
|
|||
this.bsqChainState = bsqChainState;
|
||||
this.dumpBlockchainData = dumpBlockchainData;
|
||||
|
||||
init(storageDir, dumpBlockchainData);
|
||||
}
|
||||
|
||||
private void init(@Named(Storage.STORAGE_DIR) File storageDir, @Named(DaoOptionKeys.DUMP_BLOCKCHAIN_DATA) boolean dumpBlockchainData) {
|
||||
if (dumpBlockchainData) {
|
||||
txDir = new File(Paths.get(storageDir.getAbsolutePath(), "tx").toString());
|
||||
txOutputDir = new File(Paths.get(storageDir.getAbsolutePath(), "txo").toString());
|
||||
|
@ -72,7 +76,6 @@ public class JsonChainStateExporter {
|
|||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (!txDir.mkdir())
|
||||
log.warn("make txDir failed.\ntxDir=" + txDir.getAbsolutePath());
|
||||
|
@ -87,6 +90,7 @@ public class JsonChainStateExporter {
|
|||
txOutputFileManager = new JsonFileManager(txOutputDir);
|
||||
bsqChainStateFileManager = new JsonFileManager(bsqChainStateDir);
|
||||
}
|
||||
}
|
||||
|
||||
public void shutDown() {
|
||||
if (dumpBlockchainData) {
|
||||
|
|
Loading…
Add table
Reference in a new issue