I like this simple code.

#Bitcoin

#include

typedef int64_t CAmount;

static constexpr CAmount COIN = 100000000;

static constexpr CAmount MAX_MONEY = 21000000 * COIN;

inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

Reply to this note

Please Login to reply.

Discussion

No replies yet.