The fee calculation on the CPFP dialog can be wildly inflated.
This is not a cosmetic bug.
Whatever method this dialog uses to obtain its fee per byte estimates can return values with a fractional component, as seen above.
There is an attempt to calculate the size of the all transactions in bytes and multiply it by this fee per byte figure. Unfortunately when the fee per byte is converted into a BigInteger, BigInteger seems to basically ignore the decimal point which can inflate the value by multiple orders of magnitude.
new BigInteger("1.000000001").toString()
> "1000000001"
this.ledger.Amount.fromSatoshi(1.000000001).toString();
> "1000000001"
I see the main Send panel just doesn't allow decimal places. However, this seems like quite scary behaviour from BigInteger, and allowing it to continue is asking for trouble.
The fee calculation on the CPFP dialog can be wildly inflated.
This is not a cosmetic bug.
Whatever method this dialog uses to obtain its fee per byte estimates can return values with a fractional component, as seen above.
There is an attempt to calculate the size of the all transactions in bytes and multiply it by this fee per byte figure. Unfortunately when the fee per byte is converted into a BigInteger, BigInteger seems to basically ignore the decimal point which can inflate the value by multiple orders of magnitude.
I see the main Send panel just doesn't allow decimal places. However, this seems like quite scary behaviour from BigInteger, and allowing it to continue is asking for trouble.