mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 07:12:17 +00:00
Use a slightly more sensible startup sequence for BoundedOverheadBlockStore to avoid log spam when creating a fresh chain.
This commit is contained in:
parent
96a1e87f47
commit
781cb1f8d5
@ -144,12 +144,17 @@ public class BoundedOverheadBlockStore implements BlockStore {
|
||||
|
||||
public BoundedOverheadBlockStore(NetworkParameters params, File file) throws BlockStoreException {
|
||||
this.params = params;
|
||||
try {
|
||||
load(file);
|
||||
} catch (Exception e) {
|
||||
log.error("failed to load block store from file", e);
|
||||
createNewStore(params, file);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
load(file);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to load block chain from " + file, e);
|
||||
// Fall through and try to create a new one.
|
||||
}
|
||||
}
|
||||
|
||||
createNewStore(params, file);
|
||||
}
|
||||
|
||||
private void createNewStore(NetworkParameters params, File file) throws BlockStoreException {
|
||||
|
Loading…
Reference in New Issue
Block a user