1 suggestion
Optional improvements
[suggestion] · The += test can pass without checking the updated fee rate
The assertion catches the original crash, but an empty rate would still compare equal to the expected rate if += left it unchanged.
Location: src/test/amount_tests.cpp:99 (head).
Details and suggested fix
CFeeRate::operator== compares rates by cross-multiplying their fee and size values. An empty {0,0} rate therefore compares equal to every rate: if empty_rate remained {0,0}, the assertion would still pass. This test does not verify that += produced 1000 sat/kvB. Assert the value directly, for example with BOOST_CHECK_EQUAL(empty_rate.GetFeePerK(), CAmount{1000});.