I was unable to do a "Max" amount submarine swap because the `fee_estimate` method used by `LNWallet.num_sats_can_send()` uses a hardcoded `fee_proportional_millionths` to estimate the fee for the lightning payment. When the actual fee determined later is higher than the estimated fee the payment fails as the channel is unable to add the htlc sum including the real fees as the amount exceeds the balance of the channel. Using the fees the maximum fees user has configured and estimate the potential fee as inverse of PaymentFeeBudget is more reliable/conservative as we definitely aren't going to pay more fees than this amount.
67 KiB
67 KiB