Open Impa10r opened 2 months ago
I'm skeptical that just changing the CT discount logic would make this work (though if you are providing a large margin for fee maybe it will). The fee estimation logic inherently overestimates during calculations and tends to fail near maximum balance.
Upstream added the sendall
RPC https://github.com/bitcoin/bitcoin/pull/24118 to cover this usecase, which replaces subtractfeefromamount
which was full of weird behavior.
When
sendtoaddress
is called to send the whole liquid balance less margin for fee (75-200 sats) CT discount is not applied and results in:https://github.com/ElementsProject/peerswap/pull/304#issuecomment-2303931071
We understand there is an option
subtractfeefromamount
, but prefer not to use it.