go-perun
go-perun copied to clipboard
channel proposal: pr.ChannelCreated is called before signatures are added
Background: The documentation of method Persister.ChannelCreated states that it should persist the initial channel state with the participants' signatures.
Problem: In our implementation of the channel opening protocol, ChannelCreated is called before signatures have been added to the machine state.
Apparently, this does not cause any tests to fail, but it is still a wrong usage of the Persister interface, which might cause errors when using a different implementation of the interface than the current one.
Potential fix: Move the Persister.ChannelCreated call after the signature exchange.