# Compare local snapshot implement between IRI RC12 and 1.6.0 ## Configuration ``` boolean LOCAL_SNAPSHOTS_ENABLED = true; boolean LOCAL_SNAPSHOTS_PRUNING_ENABLED = true; - int LOCAL_SNAPSHOTS_PRUNING_DELAY = 50000; - int LOCAL_SNAPSHOTS_PRUNING_DELAY_MIN = 40000; + int LOCAL_SNAPSHOTS_PRUNING_DELAY = 40000; + int LOCAL_SNAPSHOTS_PRUNING_DELAY_MIN = 10000; int LOCAL_SNAPSHOTS_INTERVAL_SYNCED = 10; int LOCAL_SNAPSHOTS_INTERVAL_UNSYNCED = 1000; int LOCAL_SNAPSHOTS_DEPTH = 100; ``` ## monitorThread ``` private void monitorThread(LatestMilestoneTracker latestMilestoneTracker) { while (!Thread.currentThread().isInterrupted()) { int localSnapshotInterval = latestMilestoneTracker.isInitialScanComplete() && snapshotProvider.getLatestSnapshot().getIndex() == latestMilestoneTracker.getLatestMilestoneIndex() ? config.getLocalSnapshotsIntervalSynced() : config.getLocalSnapshotsIntervalUnsynced(); int latestSnapshotIndex = snapshotProvider.getLatestSnapshot().getIndex(); int initialSnapshotIndex = snapshotProvider.getInitialSnapshot().getIndex(); if (latestSnapshotIndex - initialSnapshotIndex > config.getLocalSnapshotsDepth() + localSnapshotInterval) { try { snapshotService.takeLocalSnapshot(latestMilestoneTracker, transactionPruner); } catch (SnapshotException e) { log.error("error while taking local snapshot", e); } } ThreadUtils.sleep(LOCAL_SNAPSHOT_RESCAN_INTERVAL); } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up