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

Add mocks feature to solana-ibc #31

Closed
mina86 opened this issue Oct 18, 2023 · 3 comments · Fixed by #33
Closed

Add mocks feature to solana-ibc #31

mina86 opened this issue Oct 18, 2023 · 3 comments · Fixed by #33
Assignees

Comments

@mina86
Copy link
Collaborator

mina86 commented Oct 18, 2023

Currently solana-ibc has mock features which are always enabled. Ideally we would guard them via a mocks feature which is only enabled when testing and thus production code wouldn’t include the mock features.

@dhruvja
Copy link
Collaborator

dhruvja commented Oct 18, 2023

i dont think they are always enabled. For testing, we have to build by specifying mocks feature like below.

anchor build -- --features mocks

If the feature is not specified while building, the mock features are not included.

@mina86
Copy link
Collaborator Author

mina86 commented Oct 18, 2023

Ah, ok, in that case it’s just a matter of cleaning up this line in Cargo.toml:

Cargo.toml:30:ibc = { version = "0.45.0", default-features = false, features = ["serde", "mocks", "std"] }

so mocks and std are conditionally enabled.

@dhruvja
Copy link
Collaborator

dhruvja commented Oct 18, 2023

alright makes sense

@mina86 mina86 self-assigned this Oct 18, 2023
@dhruvja dhruvja linked a pull request Oct 18, 2023 that will close this issue
mina86 pushed a commit that referenced this issue Oct 18, 2023
The ibc/mocks feature is only needed when solana-ibc is built with
mocks feature is selected.  Don’t enable it unconditionally.

Fixes: #31
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 a pull request may close this issue.

2 participants