Update 13_6_Closing_a_Channel.md

This commit is contained in:
Javier Vargas 2020-07-28 13:55:20 +02:00 committed by GitHub
parent b6a6895ce2
commit cf7560ac10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,3 +46,17 @@ c$ lightning-cli --network=testnet listfunds
### Closing a channel ### Closing a channel
You should use `lightning-cli close` command to close the channel. This RPC command attempts to close the channel cooperatively with the peer, or unilaterally after unilateraltimeout expires, and the to-local output will be sent to the address specified in destination. You should use `lightning-cli close` command to close the channel. This RPC command attempts to close the channel cooperatively with the peer, or unilaterally after unilateraltimeout expires, and the to-local output will be sent to the address specified in destination.
### Types of Closing Channels.
Each participant of the channel is able to create as many Lightning payments to their counterparty as their funds they have. Most of the time there will be no disagreements between the participants, so there will only be two onchain transactions, one opening and the other closing the channel.
#### Cooperative Close
In this case both channel participants agree to close the channel and settle the final state to the blockchain. Both participants must be online and it's performed by broadcasting an unconditional spend of the funding transaction with an output to each peer.
#### Foce Close
In this case when only one participant is online or if the participants disagree on the last state of the channel, so one peer can perform an unilateral close of the channel without the cooperation of the other node. It's performed by broadcasting a commitment transaction that commits to a previous channel state which both parts have agreed upon.