-
Notifications
You must be signed in to change notification settings - Fork 586
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
Add SetConnectionState in Endpoint #3955
Comments
See this suggestion a similar concept could be applied to the connection. |
Yay! I like this suggestion, so chan := endpointA.GetChannel()
chan.State = types.OPEN
endpointA.SetChannel(chan) with endpointA.UpdateChannel(func(channel *channeltypes.Channel) {
channel.State = types.OPEN
}) and func (endpoint Endpoint) UpdateChannel(mutate func(channel *channeltypes.Channel)) {
channel := endpoint.GetChannel()
mutate(channel)
endpoint.setChannel(channel)
} |
Love to see the testing pkg get some design love :) |
ohhh that's a nice suggestion. Though I doubt there's gonna be many additional fields on the Channel (right?) I do think that's a much cleaner approach. |
note: going to close this issue at some point and open another with Cians suggestion for both Channel/Connection/anything else. Would be best to implement and refactor relevant usages after 04-channel-ugprades has been merged. |
Closing in preference to #3985 |
Summary
Similar to #3947, this is a common operation in many tests, can be:
there's quite a few instances of this in both main and in 04-channel-upgrade.
For Admin Use
The text was updated successfully, but these errors were encountered: