Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Elements-23.2.2 with CT discount cannot send full balance less fee #1358

Open
Impa10r opened this issue Aug 22, 2024 · 1 comment
Open
Labels
needs reproduction Needs a way to reproduce the bug

Comments

@Impa10r
Copy link

Impa10r commented Aug 22, 2024

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:

error code: -6
error message:
Insufficient funds

ElementsProject/peerswap#304 (comment)

We understand there is an option subtractfeefromamount, but prefer not to use it.

@apoelstra
Copy link
Member

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 bitcoin/bitcoin#24118 to cover this usecase, which replaces subtractfeefromamount which was full of weird behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction Needs a way to reproduce the bug
Projects
None yet
Development

No branches or pull requests

3 participants