10 #include <boost/test/unit_test.hpp> 12 BOOST_AUTO_TEST_SUITE(amount_tests)
106 int largeNumber = 1000000;
107 BOOST_CHECK(largeNumber * feeRate == feeRate * largeNumber);
109 int maxInt = std::numeric_limits<int>::max();
bool MoneyRange(const CAmount &nValue)
Use BTC/kvB fee rate unit.
int64_t CAmount
Amount in satoshis (Can be negative)
BOOST_AUTO_TEST_CASE(MoneyRangeTest)
BOOST_AUTO_TEST_SUITE_END()
std::string ToString(FeeRateFormat fee_rate_format=FeeRateFormat::BTC_KVB) const
#define BOOST_CHECK_EQUAL(v1, v2)
Use sat/vB fee rate unit.
Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac...
static constexpr CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
CAmount GetFee(int32_t virtual_bytes) const
Return the fee in satoshis for the given vsize in vbytes.
CAmount GetFeePerK() const
Return the fee in satoshis for a vsize of 1000 vbytes.
#define BOOST_CHECK(expr)