-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
8c8d5ee
to
5f410da
Compare
64d3ebd
to
4ce89c4
Compare
098fa3c
to
d6ce7bb
Compare
d6ce7bb
to
877928a
Compare
Don't check client id in handler, check it when loading the client
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); } ```
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); | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.