Skip to content

Splice-Script: Fix for when channel balances include msats#9097

Open
ddustin wants to merge 2 commits intoElementsProject:masterfrom
ddustin:ddustin/splicein_fix
Open

Splice-Script: Fix for when channel balances include msats#9097
ddustin wants to merge 2 commits intoElementsProject:masterfrom
ddustin:ddustin/splicein_fix

Conversation

@ddustin
Copy link
Copy Markdown
Collaborator

@ddustin ddustin commented Apr 27, 2026

Splice script validation was too strict and aborted if msats were 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_sat strict, namely: addpsbt's excess_msat and emergency_sat which are logically sats even though they are msats in 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 splicein and spliceout commands on channels with msats as they are built on splice script.

Fixes #9093

ddustin added 2 commits April 27, 2026 13:53
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.
@ddustin ddustin force-pushed the ddustin/splicein_fix branch from 724621f to 2379288 Compare April 27, 2026 20:53
@ddustin ddustin added this to the v26.04 milestone Apr 27, 2026
@madelinevibes madelinevibes modified the milestones: v26.04, 26.06 Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command splicein not working and crashes node

2 participants