Browse Source

Move `COIN` and `CENT` to core.h

Eventually these should end up in `money.h` after monetary
amounts are typedef'ed, but at least they don't belong in `util.h`.
0.10
Wladimir J. van der Laan 10 years ago
parent
commit
f841aa2892
  1. 3
      src/core.h
  2. 3
      src/util.h

3
src/core.h

@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
class CTransaction;
static const int64_t COIN = 100000000;
static const int64_t CENT = 1000000;
/** No amount larger than this (in satoshi) is valid */
static const int64_t MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

3
src/util.h

@ -34,9 +34,6 @@ @@ -34,9 +34,6 @@
class uint256;
static const int64_t COIN = 100000000;
static const int64_t CENT = 1000000;
#define BEGIN(a) ((char*)&(a))
#define END(a) ((char*)&((&(a))[1]))
#define UBEGIN(a) ((unsigned char*)&(a))

Loading…
Cancel
Save