go-perun
go-perun copied to clipboard
Close channel automatically when settling
Related to https://github.com/hyperledger-labs/go-perun/pull/83#discussion_r666230937_
Problem: Closing a channel involves calling channel.Settle and channel.Close. It is easy to mix up the two, or forget to call one of them, and I don't see a case where I want to do one without the other.
Suggestion: Always close when settling.
Important: Closing a channel deletes it from the registry. We need to be careful not to delete virtual channels before all parent channels are closed.