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

Can we reconnect to the channel after withdraw #830

Closed
skenan opened this issue Jan 29, 2018 · 4 comments
Closed

Can we reconnect to the channel after withdraw #830

skenan opened this issue Jan 29, 2018 · 4 comments
Assignees
Labels

Comments

@skenan
Copy link

skenan commented Jan 29, 2018

Process:
I created a channel with another peer:

  • The fund in channel is 2000 msat
  • The balance left is 8000 msat

Then I just withdraw the 8000 msat to my original bitcoin address without closing the channel.

The channel is still open, I can see that with lightning-cli listpeers

But I can't see the channel with lightning-cli listchannels

I wonder if I can reconnect the channel since it's still open. Or I have to close the peer to get my fund?

@cdecker
Copy link
Member

cdecker commented Jan 29, 2018

I think you're mixing several different concepts. listpeers shows your directed peers in all possible states, whether they are connected or not. listchannels shows the publicly available channels, not just your direct peers. For your channel to show up in listchannels it needs to have at least 6 confirmations and both endpoints have to have opted into making this a public channel.

The balance that you're seeing and withdrawing, is the balance that you alone control, i.e., the balance that is not part of any channels. So withdrawing those funds do not do anything to your channel, which will stay open until you or your peer closes it. To get the funds out of the channel, you'd first close it, wait for your funds to become available again and then withdraw them to your bitcoin wallet.

@cdecker cdecker self-assigned this Jan 29, 2018
@skenan
Copy link
Author

skenan commented Jan 30, 2018

@cdecker Thanks for your explanation! But after I did the withdraw, I was not able to use the money in the channel to pay, I have to close it, is this an expected behavior?

@ZmnSCPxj
Copy link
Collaborator

ZmnSCPxj commented Jan 30, 2018

@skenan yes.

Money in a Lightning channel is not money onchain. The withdraw command requires onchain funds. To get money from a Lightning channel to onchain, first you need to close one or more of your channels.

There is proposal to directly move onchain and offchain funds. lightning/bolts#280 and also this mailinglist posts: https://lists.linuxfoundation.org/pipermail/lightning-dev/2017-December/000866.html https://lists.linuxfoundation.org/pipermail/lightning-dev/2017-December/000865.html

@skenan
Copy link
Author

skenan commented Jan 31, 2018

@ZmnSCPxj Thank you. I can close this issue.

@skenan skenan closed this as completed Jan 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants