Changeset View
Changeset View
Standalone View
Standalone View
src/amount.h
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
static const Amount CENT = 1000000; | static const Amount CENT = 1000000; | ||||
extern const std::string CURRENCY_UNIT; | extern const std::string CURRENCY_UNIT; | ||||
/** | /** | ||||
* No amount larger than this (in satoshi) is valid. | * No amount larger than this (in satoshi) is valid. | ||||
* | * | ||||
* Note that this constant is *not* the total money supply, which in Bitcoin | * Note that this constant is *not* the total money supply, which in Bitcoin | ||||
* currently happens to be less than 21,000,000 BCC for various reasons, but | * currently happens to be less than 21,000,000 BCH for various reasons, but | ||||
* rather a sanity check. As this sanity check is used by consensus-critical | * rather a sanity check. As this sanity check is used by consensus-critical | ||||
* validation code, the exact value of the MAX_MONEY constant is consensus | * validation code, the exact value of the MAX_MONEY constant is consensus | ||||
* critical; in unusual circumstances like a(nother) overflow bug that allowed | * critical; in unusual circumstances like a(nother) overflow bug that allowed | ||||
* for the creation of coins out of thin air modification could lead to a fork. | * for the creation of coins out of thin air modification could lead to a fork. | ||||
*/ | */ | ||||
static const Amount MAX_MONEY = 21000000 * COIN; | static const Amount MAX_MONEY = 21000000 * COIN; | ||||
inline bool MoneyRange(const Amount nValue) { | inline bool MoneyRange(const Amount nValue) { | ||||
return (nValue >= 0 && nValue <= MAX_MONEY); | return (nValue >= 0 && nValue <= MAX_MONEY); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |