public LevelDBFullPrunedBlockStore(NetworkParameters params, String filename, int blockCount, long leveldbReadCache, int leveldbWriteCache, int openOutCache, boolean instrument, int exitBlock) { this.params = params; fullStoreDepth = blockCount; this.instrument = instrument; this.exitBlock = exitBlock; methodStartTime = new HashMap<>(); methodCalls = new HashMap<>(); methodTotalTime = new HashMap<>(); this.filename = filename; this.leveldbReadCache = leveldbReadCache; this.leveldbWriteCache = leveldbWriteCache; this.openOutCache = openOutCache; bloom = new BloomFilter(); totalStopwatch = Stopwatch.createStarted(); openDB(); bloom.reloadCache(db); // Reset after bloom filter loaded totalStopwatch = Stopwatch.createStarted(); }
public LevelDBFullPrunedBlockStore(NetworkParameters params, String filename, int blockCount, long leveldbReadCache, int leveldbWriteCache, int openOutCache, boolean instrument, int exitBlock) { this.params = params; fullStoreDepth = blockCount; this.instrument = instrument; this.exitBlock = exitBlock; methodStartTime = new HashMap<>(); methodCalls = new HashMap<>(); methodTotalTime = new HashMap<>(); this.filename = filename; this.leveldbReadCache = leveldbReadCache; this.leveldbWriteCache = leveldbWriteCache; this.openOutCache = openOutCache; bloom = new BloomFilter(); totalStopwatch = Stopwatch.createStarted(); openDB(); bloom.reloadCache(db); // Reset after bloom filter loaded totalStopwatch = Stopwatch.createStarted(); }
public LevelDBFullPrunedBlockStore(NetworkParameters params, String filename, int blockCount, long leveldbReadCache, int leveldbWriteCache, int openOutCache, boolean instrument, int exitBlock) { this.params = params; fullStoreDepth = blockCount; this.instrument = instrument; this.exitBlock = exitBlock; methodStartTime = new HashMap<String, Stopwatch>(); methodCalls = new HashMap<String, Long>(); methodTotalTime = new HashMap<String, Long>(); this.filename = filename; this.leveldbReadCache = leveldbReadCache; this.leveldbWriteCache = leveldbWriteCache; this.openOutCache = openOutCache; bloom = new BloomFilter(); totalStopwatch = Stopwatch.createStarted(); openDB(); bloom.reloadCache(db); // Reset after bloom filter loaded totalStopwatch = Stopwatch.createStarted(); }
public LevelDBFullPrunedBlockStore(NetworkParameters params, String filename, int blockCount, long leveldbReadCache, int leveldbWriteCache, int openOutCache, boolean instrument, int exitBlock) { this.params = params; fullStoreDepth = blockCount; this.instrument = instrument; this.exitBlock = exitBlock; methodStartTime = new HashMap<String, Stopwatch>(); methodCalls = new HashMap<String, Long>(); methodTotalTime = new HashMap<String, Long>(); this.filename = filename; this.leveldbReadCache = leveldbReadCache; this.leveldbWriteCache = leveldbWriteCache; this.openOutCache = openOutCache; bloom = new BloomFilter(); totalStopwatch = Stopwatch.createStarted(); openDB(); bloom.reloadCache(db); // Reset after bloom filter loaded totalStopwatch = Stopwatch.createStarted(); }
public void resetStore() { // only used in unit tests. // bit dangerous and deletes files! try { db.close(); uncommited = null; uncommitedDeletes = null; autoCommit = true; bloom = new BloomFilter(); utxoCache = new LRUCache(openOutCache, 0.75f); } catch (IOException e) { log.error("Exception in resetStore.", e); } File f = new File(filename); if (f.isDirectory()) { for (File c : f.listFiles()) c.delete(); } openDB(); } }
public void resetStore() { // only used in unit tests. // bit dangerous and deletes files! try { db.close(); uncommited = null; uncommitedDeletes = null; autoCommit = true; bloom = new BloomFilter(); utxoCache = new LRUCache(openOutCache, 0.75f); } catch (IOException e) { log.error("Exception in resetStore.", e); } File f = new File(filename); if (f.isDirectory()) { for (File c : f.listFiles()) c.delete(); } openDB(); } }
public void resetStore() { // only used in unit tests. // bit dangerous and deletes files! try { db.close(); uncommited = null; uncommitedDeletes = null; autoCommit = true; bloom = new BloomFilter(); utxoCache = new LRUCache(openOutCache, 0.75f); } catch (IOException e) { log.error("Exception in resetStore.", e); } File f = new File(filename); if (f.isDirectory()) { for (File c : f.listFiles()) c.delete(); } openDB(); } }
public void resetStore() { // only used in unit tests. // bit dangerous and deletes files! try { db.close(); uncommited = null; uncommitedDeletes = null; autoCommit = true; bloom = new BloomFilter(); utxoCache = new LRUCache(openOutCache, 0.75f); } catch (IOException e) { log.error("Exception in resetStore.", e); } File f = new File(filename); if (f.isDirectory()) { for (File c : f.listFiles()) c.delete(); } openDB(); } }