File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1759,6 +1759,15 @@ BOOST_AUTO_TEST_CASE(test_ParseFixedPoint)
1759
1759
BOOST_CHECK (!ParseFixedPoint (" 1.1e" , 8 , &amount));
1760
1760
BOOST_CHECK (!ParseFixedPoint (" 1.1e-" , 8 , &amount));
1761
1761
BOOST_CHECK (!ParseFixedPoint (" 1." , 8 , &amount));
1762
+
1763
+ // Test with 3 decimal places for fee rates in sat/vB.
1764
+ BOOST_CHECK (ParseFixedPoint (" 0.001" , 3 , &amount));
1765
+ BOOST_CHECK_EQUAL (amount, CAmount{1 });
1766
+ BOOST_CHECK (!ParseFixedPoint (" 0.0009" , 3 , &amount));
1767
+ BOOST_CHECK (!ParseFixedPoint (" 31.00100001" , 3 , &amount));
1768
+ BOOST_CHECK (!ParseFixedPoint (" 31.0011" , 3 , &amount));
1769
+ BOOST_CHECK (!ParseFixedPoint (" 31.99999999" , 3 , &amount));
1770
+ BOOST_CHECK (!ParseFixedPoint (" 31.999999999999999999999" , 3 , &amount));
1762
1771
}
1763
1772
1764
1773
static void TestOtherThread (fs::path dirname, std::string lockname, bool *result)
You can’t perform that action at this time.
0 commit comments