Splice-Script: Fix for when channel balances include msats#9097
Open
ddustin wants to merge 2 commits intoElementsProject:masterfrom
Open
Splice-Script: Fix for when channel balances include msats#9097ddustin wants to merge 2 commits intoElementsProject:masterfrom
ddustin wants to merge 2 commits intoElementsProject:masterfrom
Conversation
Test splice scripts where the existing channel balance has fractions of a sat in them.
When getting channel balances, we round off the msats for splice script. Changelog-Fixed: Fix for `splicein`, `spliceout`, and `dev-splice` commands where channel balances included partial sats.
724621f to
2379288
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Splice script validation was too strict and aborted if
msatswere found in the channel balance. The correct behavior is to round them down and let the balances reemerge naturally post splice.We keep other uses for
msat_to_satstrict, namely:addpsbt'sexcess_msatandemergency_satwhich are logicallysatseven though they aremsatsin the RPC.Also adds two tests to test channel msat balances that would logically round down or up to confirm we're always rounding down.
This also fixes
spliceinandspliceoutcommands on channels withmsatsas they are built on splice script.Fixes #9093