File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,15 @@ typedef int64_t CAmount;
16
16
static const CAmount COIN = 100000000 ;
17
17
static const CAmount CENT = 1000000 ;
18
18
19
- /* * No amount larger than this (in satoshi) is valid */
19
+ /* * No amount larger than this (in satoshi) is valid.
20
+ *
21
+ * Note that this constant is *not* the total money supply, which in Bitcoin
22
+ * currently happens to be less than 21,000,000 BTC for various reasons, but
23
+ * rather a sanity check. As this sanity check is used by consensus-critical
24
+ * validation code, the exact value of the MAX_MONEY constant is consensus
25
+ * critical; in unusual circumstances like a(nother) overflow bug that allowed
26
+ * for the creation of coins out of thin air modification could lead to a fork.
27
+ * */
20
28
static const CAmount MAX_MONEY = 21000000 * COIN;
21
29
inline bool MoneyRange (const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
22
30
You can’t perform that action at this time.
0 commit comments