Skip to content

Commit

Permalink
Merge pull request namecoin-qt#4 from phelixbtc/patch-2
Browse files Browse the repository at this point in the history
Reduce sync frequency for blkindex.dat
  • Loading branch information
namecoin-qt committed Jun 24, 2013
2 parents dd3cfe4 + e6c9e7d commit 60dd4c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/db.cpp
Expand Up @@ -144,8 +144,10 @@ void CDB::Close()
nMinutes = 1;
if (strFile == "addr.dat")
nMinutes = 2;
if (strFile == "blkindex.dat")
nMinutes = 2;
if (strFile == "blkindex.dat" && IsInitialBlockDownload() && nBestHeight % 5000 != 0)
nMinutes = 1;
nMinutes = 5;
dbenv.txn_checkpoint(0, nMinutes, 0);

CRITICAL_BLOCK(cs_db)
Expand Down

0 comments on commit 60dd4c5

Please sign in to comment.