Mercurial > hg > bitcoin
diff src/main.h @ 3648:4e4ec61eb33d draft
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.
author | Pieter Wuille <pieter.wuille@gmail.com> |
---|---|
date | Thu, 16 Aug 2012 02:21:28 +0200 (2012-08-16) |
parents | fdd92a9e5196 |
children | eb986f1e2e93 |
line wrap: on
line diff
--- a/src/main.h +++ b/src/main.h @@ -29,6 +29,8 @@ 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;