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

feat!: complete client verification #20

Merged
merged 28 commits into from
Nov 29, 2023
Merged

feat!: complete client verification #20

merged 28 commits into from
Nov 29, 2023

Conversation

blckngm
Copy link
Contributor

@blckngm blckngm commented Nov 7, 2023

No description provided.

@blckngm blckngm marked this pull request as ready for review November 16, 2023 03:23
Flouse pushed a commit that referenced this pull request Nov 21, 2023
Co-authored-by: liyukun <[email protected]>

These checks are also covered in #20 as:

```
    if old.state != State::Open {
        return Err(VerifyError::WrongChannelState);
    }
    if !old_args.open {
        return Err(VerifyError::WrongChannelArgs);
    }

    old.state = State::Closed;
    old_args.open = false;
    if old != new {
        return Err(VerifyError::WrongChannel);
    }
    if old_args != new_args {
        return Err(VerifyError::WrongChannelArgs);
    }
```
@blckngm blckngm changed the title WIP: feat: complete client verification feat!: complete client verification Nov 24, 2023
Comment on lines -462 to 549
if !old_args.open
|| new_args.open
|| old_args.client_id != new_args.client_id
|| old_args.channel_id != new_args.channel_id
|| old_args.port_id != new_args.port_id
{
if !old_args.open {
return Err(VerifyError::WrongChannelArgs);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason of deleting these checks is the following light client check has already covered them in an alternative way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These kind of checks are replaced by “mutate and compare equal” checks, see the following lines.

@blckngm blckngm merged commit d3e0ea8 into main Nov 29, 2023
1 check passed
@blckngm blckngm deleted the complete-client branch November 29, 2023 06:24
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.

3 participants