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

fix: match Order #699

Closed
wants to merge 2 commits into from
Closed

Conversation

Mehrbod2002
Copy link

Closes: #394

@plafer
Copy link
Contributor

plafer commented Jun 2, 2023

Thank you for submitting your first contribution!

Although @DaviRain-Su suggested doing this in the issue, this is not really what I had in mind. The goal is to remove the order_matches method.

I looked into it again, and I believe we should change all calls of the form

if chan_end.order_matches(&Order::Ordered) {
  /* if branch contents */
} else {
  /* else branch contents */
}

to

match chan_end_on_b.ordering {
    Order::Ordered => {
        /* if branch contents */
    },
    Order::Unordered => {
        /* else branch contents */
    }
    Order::None => {
        /* do nothing */
    }
}

, and then remove ChannelEnd::order_matches.

This matches the ibc-go behavior.

@plafer
Copy link
Contributor

plafer commented Jun 26, 2023

Closing as stale; feel free to open a new PR with the abovementionned suggestions applied!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ChannelEnd::order_matches()
2 participants