-
Notifications
You must be signed in to change notification settings - Fork 912
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
splice: first pass on splice_out command #6777
Conversation
Added splice_out RPC command and a simple test of it as well. ChangeLog-Added: splice_out command added for doing a splice out more easily.
Should use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be one level up, in a plugin. Let's circle up about it soon and get moving that direction instead.
Nice and short tho!
l1, l2 = node_factory.line_graph(2, fundamount=1000000, wait_for_announce=True, opts={'experimental-splicing': None}) | ||
|
||
l1.rpc.splice_out(l1.get_channel_id(l2), 100000) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: check that the money moved!
if (cc->auto_complete) { | ||
subd_send_msg(channel->owner, | ||
take(towire_channeld_splice_update(NULL, psbt))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: less vertical space please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually let's regroup about this and talk about how to make it better!
|
||
psbt_append_output(psbt, b32script, *amount); | ||
|
||
weight = wally_psbt_weight(psbt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you're going to want to add the signature witness byte weight as well, or at least an estimate for it.
Working on a generic splice json / script protocol that can handle doing any kind of splice. Then splice-out, splice-in, etc will use that RPC and pass it the correct json to do it. First PR in that larger project here: #6980 |
Added splice_out RPC command and a simple test of it as well.