Skip to content

Passing negative amount to splice_init fails with unrecognized option #6612

Description

@Sjors

Running v23.08 with experimental_splicing on Ubuntu 23.04, GNU bash, version 5.2.15.

Trying to splice in a positive amount "works" as expected:

lightning-cli splice_init ... 1sat
{
   "code": 354,
   "message": "splicing not supported"
}

Trying to splice out a negative amount doesn't:

lightning-cli splice_init ... -1sat
lightning-cli: -1sat: unrecognized option

I also tried \-1sat and "1sat".

It does seem to work with -k:

lightning-cli splice_init -k channel_id=... amount=-1sat
{
   "code": 354,
   "message": "splicing not supported"
}

Maybe it's easier to just have splice_in_init and splice_out_init with only positive amounts? The rest of the RPCs would stay unchanged.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions