aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-08-16 02:21:28 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:57 +0200
commitbba89aa82a80f0373dcb7288d96d5b0fcb453d73 (patch)
treef3b4fd8649021b52e19cfdf4620ffead5f30910e /src/main.h
parent5382bcf8cd23c36a435c29080770a79b5e28af42 (diff)
downloadbitcoin-bba89aa82a80f0373dcb7288d96d5b0fcb453d73.tar.xz
Pre-allocate block and undo files in chunks
Introduce a AllocateFileRange() function in util, which wipes or at least allocates a given range of a file. It can be overriden by more efficient OS-dependent versions if necessary. Block and undo files are now allocated in chunks of 16 and 1 MiB, respectively.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 449cc47df8..936a4e184d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -29,6 +29,8 @@ static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
static const unsigned int MAX_INV_SZ = 50000;
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
+static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
+static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
static const int64 MIN_TX_FEE = 50000;
static const int64 MIN_RELAY_TX_FEE = 10000;
static const int64 MAX_MONEY = 21000000 * COIN;