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 |
niftynei
left a comment
There was a problem hiding this comment.
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.
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.
nit: less vertical space please
There was a problem hiding this comment.
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.
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.