Skip to content
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

feat(rpc): CloseChannel call #1478

Merged
merged 1 commit into from
Apr 29, 2020
Merged

feat(rpc): CloseChannel call #1478

merged 1 commit into from
Apr 29, 2020

Conversation

sangaman
Copy link
Collaborator

This introduces the ability to close channels through xud. Currently this is only implemented for lnd, and is implemented in a naive way that relies on the peer we are trying to close channels with being online and cooperative.

Closes #1471. Follow-ups are #1472 and #1476.

I've tested this fairly extensively to ensure we are handling the responses from lnd correctly and it's working well.

@sangaman sangaman added grpc gRPC API lightning Lightning network & lnd integration labels Apr 14, 2020
@sangaman sangaman requested review from a user and michael1011 April 14, 2020 06:38
@sangaman sangaman self-assigned this Apr 14, 2020
@kilrau kilrau added the P1 top priority label Apr 14, 2020
import { CloseChannelRequest } from '../../proto/xudrpc_pb';
import { callback, loadXudClient } from '../command';

export const command = 'closechannel <node_identifier> <currency>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The [force] parameter is missing here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually intentional since it's a flag, I'm envisioning it's usage as just adding --force to the command.

It looks like I can put closechannel <node_identifier> <currency> [--force] here and then it'll work either by putting true at the end of the command or --force anywhere in the command, so that's what I'll go with.

@kilrau
Copy link
Contributor

kilrau commented Apr 24, 2020

Would yo ustill want this for the bot for beta.3? @michael1011

@michael1011
Copy link
Contributor

Would yo ustill want this for the bot for beta.3?

It would be nice to have. I will give this PR another review

lib/lndclient/LndClient.ts Show resolved Hide resolved
This introduces the ability to close channels through xud. Currently
this is only implemented for lnd, and is implemented in a naive way
that relies on the peer we are trying to close channels with being
online and cooperative.

Closes #1471. Follow-ups are #1472 and #1476.
@sangaman sangaman merged commit 7c5c86d into master Apr 29, 2020
@sangaman sangaman deleted the rpc/close-channel branch April 29, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grpc gRPC API lightning Lightning network & lnd integration P1 top priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LND: closechannel <alias>/<nodekey> <currency> [force]
3 participants