Skip to content
This repository

Comments for constants #1973

Merged
merged 1 commit into from over 1 year ago

5 participants

Pieter Wuille Gavin Andresen P. Kaufmann Gregory Maxwell BitcoinPullTester
Pieter Wuille
Collaborator

No functional changes.

Gavin Andresen

ACK

P. Kaufmann

That's a good thing!

Gregory Maxwell
Collaborator

Violations of MAX_INV_SZ get you DOSflagged. So it should get some "P2P node rule" flag, perhaps? MAX_MONEY is an implicit protocol rule. Kinda obvious though. ACK in any case.

BitcoinPullTester

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/9d6633ac0de9d2a24333525cffdf0b23164ecad3 for binaries and test log.

Pieter Wuille sipa merged commit 7fac577 into from
Pieter Wuille sipa closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 02, 2012
Pieter Wuille sipa Comments for constants 9d6633a
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. +14 1 src/main.h
15 src/main.h
@@ -24,21 +24,34 @@ class CNode;
24 24
25 25 class CBlockIndexWorkComparator;
26 26
  27 +/** The maximum allowed size for a serialized block, in bytes (network rule) */
27 28 static const unsigned int MAX_BLOCK_SIZE = 1000000;
  29 +/** The maximum size for mined blocks */
28 30 static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
  31 +/** The maximum allowed number of signature check operations in a block (network rule) */
29 32 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
  33 +/** The maximum number of orphan transactions kept in memory */
30 34 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
  35 +/** The maximum number of entries in an 'inv' protocol message */
31 36 static const unsigned int MAX_INV_SZ = 50000;
  37 +/** The maximum size of a blk?????.dat file (since 0.8) */
32 38 static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
  39 +/** The pre-allocation chunk size for blk?????.dat files (since 0.8) */
33 40 static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
  41 +/** The pre-allocation chunk size for rev?????.dat files (since 0.8) */
34 42 static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
  43 +/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */
35 44 static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
  45 +/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
36 46 static const int64 MIN_TX_FEE = 50000;
  47 +/** Fees smaller than this (in satoshi) are considered zero fee (for relaying) */
37 48 static const int64 MIN_RELAY_TX_FEE = 10000;
  49 +/** No amount larger than this (in satoshi) is valid */
38 50 static const int64 MAX_MONEY = 21000000 * COIN;
39 51 inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
  52 +/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
40 53 static const int COINBASE_MATURITY = 100;
41   -// Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp.
  54 +/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
42 55 static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
43 56 #ifdef USE_UPNP
44 57 static const int fHaveUPnP = true;

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.