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

solana-ibc: fix lack of client id checking and add client references #108

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

mina86
Copy link
Collaborator

@mina86 mina86 commented Nov 19, 2023

Firstly, and most importantly, add a missing client_id check in
PrivateStorage::client_mut method. When getting an existing client we
must check that the client id given as argument matches the one stored
in the ClientStore. PrivateStorage::client performed that check alas,
PrivateStorage::client_mut lacked it. Add it as required.

Secondly, introduce ClientRef and ClientMut reference types which
replace previously used pairs. Those type clarify some of the code by
naming the index field and simplify other code by removing the need
for .1 to get the reference.

Issue: #35

Firstly, and most importantly, add a missing client_id check in
PrivateStorage::client_mut method.  When getting an existing client we
must check that the client id given as argument matches the one stored
in the ClientStore.  PrivateStorage::client performed that check alas,
PrivateStorage::client_mut lacked it.  Add it as required.

Secondly, introduce ClientRef and ClientMut reference types which
replace previously used pairs.  Those type clarify some of the code by
naming the index field and simplify other code by removing the need
for `.1` to get the reference.

Issue: #35
@mina86 mina86 requested review from blasrodri and dhruvja November 19, 2023 00:42
@mina86 mina86 merged commit 68a250c into master Nov 19, 2023
5 checks passed
@mina86 mina86 deleted the mpn/f branch November 19, 2023 17:55
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.

2 participants