-
Notifications
You must be signed in to change notification settings - Fork 210
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
chore: gateway list_active_channels command includes funding outpoint #5217
chore: gateway list_active_channels command includes funding outpoint #5217
Conversation
pub channel_point_txid: String, | ||
pub channel_point_output_index: u32, |
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.
Thoughts on just making this an OutPoint
, that is serialized as <txid>:<out_idx>
on the wire?
let (channel_point_txid, channel_point_output_index) = channel | ||
.channel_point | ||
.split_once(':') | ||
.map(|(txid, output_index)| { | ||
( | ||
txid.to_string(), | ||
output_index.parse::<u32>().unwrap_or_default(), | ||
) | ||
}) | ||
.unwrap_or_default(); |
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.
We could actually save that custom parsing logic by just using OutPoit::from_str
See #5218 (comment) We could save needing to do this if we just want to use the Closing channels should (hopefully) be rare, I don't think introducing another RPC call to lookup the necessary info from the |
Good point! Converting this to a draft for now, will probably close later. |
dev call: might not need this anymore ... |
Closing now that #5218 is merged, which allows closing channels by peer ID rather than by funding outpoint |
To close a channel, both LDK and LND require the channel's funding TXID and output index, so we're adding them to the
gateway lightning list-active-channels
command output to ensure all necessary data is present to close channels