Reduce sync frequency for blkindex.dat
authorPieter Wuille <pieter.wuille@gmail.com>
Tue, 17 Apr 2012 16:27:00 +0000 (18:27 +0200)
committerPieter Wuille <pieter.wuille@gmail.com>
Tue, 17 Apr 2012 16:27:18 +0000 (18:27 +0200)
Since auto-remove-db-logs was enabled, each time a CTxDB was closed
outside of the initial download window, it causes a checkpoint + log
cleanup. This is overkill, so reduce the sync frequency to once per
minute at most.

src/db.cpp

index 2d13691..0652e4a 100644 (file)
@@ -162,6 +162,8 @@ void CDB::Close()
         nMinutes = 1;
     if (strFile == "addr.dat")
         nMinutes = 2;
+    if (strFile == "blkindex.dat")
+        nMinutes = 2;
     if (strFile == "blkindex.dat" && IsInitialBlockDownload())
         nMinutes = 5;