mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Add multiplication operator to CFeeRate
This commit is contained in:
@@ -85,6 +85,12 @@ BOOST_AUTO_TEST_CASE(GetFeeTest)
|
||||
BOOST_CHECK(CFeeRate(CAmount(27), 789) == CFeeRate(34));
|
||||
// Maximum size in bytes, should not crash
|
||||
CFeeRate(MAX_MONEY, std::numeric_limits<uint32_t>::max()).GetFeePerK();
|
||||
|
||||
// check multiplication operator
|
||||
feeRate = CFeeRate(1000);
|
||||
BOOST_CHECK(0 * feeRate == CFeeRate(0));
|
||||
BOOST_CHECK(3 * feeRate == CFeeRate(3000));
|
||||
BOOST_CHECK(-3 * feeRate == CFeeRate(-3000));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(BinaryOperatorTest)
|
||||
|
||||
Reference in New Issue
Block a user