mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +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 {
|
public BoundedOverheadBlockStore(NetworkParameters params, File file) throws BlockStoreException {
|
||||||
this.params = params;
|
this.params = params;
|
||||||
try {
|
if (file.exists()) {
|
||||||
load(file);
|
try {
|
||||||
} catch (Exception e) {
|
load(file);
|
||||||
log.error("failed to load block store from file", e);
|
return;
|
||||||
createNewStore(params, file);
|
} 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 {
|
private void createNewStore(NetworkParameters params, File file) throws BlockStoreException {
|
||||||
|
Loading…
Reference in New Issue
Block a user