|
|
@ -26,11 +26,11 @@ class CNode; |
|
|
|
struct CBlockIndexWorkComparator; |
|
|
|
struct CBlockIndexWorkComparator; |
|
|
|
|
|
|
|
|
|
|
|
/** The maximum allowed size for a serialized block, in bytes (network rule) */ |
|
|
|
/** The maximum allowed size for a serialized block, in bytes (network rule) */ |
|
|
|
static const unsigned int MAX_BLOCK_SIZE = 1000000; |
|
|
|
static const unsigned int MAX_BLOCK_SIZE = 1000000; // 1000KB block hard limit
|
|
|
|
/** The maximum size for mined blocks */ |
|
|
|
/** The maximum size for mined blocks */ |
|
|
|
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2; |
|
|
|
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4; // 250KB block soft limit
|
|
|
|
/** The maximum size for transactions we're willing to relay/mine */ |
|
|
|
/** The maximum size for transactions we're willing to relay/mine */ |
|
|
|
static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/5; |
|
|
|
static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/2.5; // 100KB tx size limit
|
|
|
|
/** The maximum allowed number of signature check operations in a block (network rule) */ |
|
|
|
/** The maximum allowed number of signature check operations in a block (network rule) */ |
|
|
|
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; |
|
|
|
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; |
|
|
|
/** The maximum number of orphan transactions kept in memory */ |
|
|
|
/** The maximum number of orphan transactions kept in memory */ |
|
|
@ -45,6 +45,10 @@ static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB |
|
|
|
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
|
|
|
|
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
|
|
|
|
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */ |
|
|
|
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */ |
|
|
|
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF; |
|
|
|
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF; |
|
|
|
|
|
|
|
/** Dust Soft Limit, allowed with additional fee per output */ |
|
|
|
|
|
|
|
static const int64 DUST_SOFT_LIMIT = 1000000; // 0.01 LTC
|
|
|
|
|
|
|
|
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */ |
|
|
|
|
|
|
|
static const int64 DUST_HARD_LIMIT = 10000; // 0.0001 LTC mininput
|
|
|
|
/** No amount larger than this (in satoshi) is valid */ |
|
|
|
/** No amount larger than this (in satoshi) is valid */ |
|
|
|
static const int64 MAX_MONEY = 84000000 * COIN; |
|
|
|
static const int64 MAX_MONEY = 84000000 * COIN; |
|
|
|
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } |
|
|
|
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } |
|
|
|