From 67708acff9c18e380fa6136ff0ae718959ead4b5 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 4 May 2015 22:00:19 +0200 Subject: Write block index more frequently than cache flushes --- src/main.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 2c4a4cb7cd..fcbc4075d2 100644 --- a/src/main.h +++ b/src/main.h @@ -82,8 +82,10 @@ static const unsigned int MAX_HEADERS_RESULTS = 2000; * degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning * harder). We'll probably want to make this a per-peer adaptive value at some point. */ static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024; -/** Time to wait (in seconds) between writing blockchain state to disk. */ -static const unsigned int DATABASE_WRITE_INTERVAL = 3600; +/** Time to wait (in seconds) between writing blocks/block index to disk. */ +static const unsigned int DATABASE_WRITE_INTERVAL = 60 * 60; +/** Time to wait (in seconds) between flushing chainstate to disk. */ +static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60; /** Maximum length of reject messages. */ static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111; -- cgit v1.2.3