Change amounts could be negative after deducting the cost of the extra change output; floor them at zero. Move the assertion to the main code. Simplify rounding logic.
11 KiB
11 KiB