Make counterparty_node_id optional for close/force-close/update-channel-config#126
Make counterparty_node_id optional for close/force-close/update-channel-config#126benthecarman wants to merge 1 commit intolightningdevkit:mainfrom
Conversation
…el-config When counterparty_node_id is not provided, the server resolves it by looking up the channel via user_channel_id from the channel list.
|
👋 Thanks for assigning @tankyleo as a reviewer! |
There was a problem hiding this comment.
Hmm, so far including the counterparty_node_id was a dedicated API design choice in LDK Node to ensure users are positive which exact channel they want to close.
Yes, it's belt-and-suspenders. But, if we think we don't need this, IMO we should change it in LDK Node (which I'm def. open to), rather than having Server's API diverge here?
|
Me and @tankyleo were talking and assumed it was just so we didn't have to iterate over all channels in ldk-node but if it is just for safety i guess that makes sense. It is more annoying for the CLI rather than in code but no real strong feelings here |
|
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
Yeah, I'm also not feeling strongly. FWIW, having both precedes the use of |
|
Pre-open two channels can have the same channel id so it's definitely required. Obviously the user id should be unique. |
Well, note that the API here uses the |
|
I dunno if LDK Node forces user ids to be random but note that at least in upstream LDK you can reuse user ids as much as you want. |
We don't give users the chance to set them freely and force them to be random, exactly in order to be able to use them everywhere as a stable identifier for channels throughout the API. |
When
counterparty_node_idis not provided, the server resolves it by looking up the channel via user_channel_id from the channel list.