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

fraud: use header/mocks.Store instead of custom mockStore #1542

Closed
Wondertan opened this issue Dec 23, 2022 · 5 comments
Closed

fraud: use header/mocks.Store instead of custom mockStore #1542

Wondertan opened this issue Dec 23, 2022 · 5 comments
Assignees
Labels
area:fraud good first issue Good for newcomers kind:testing Related to unit tests

Comments

@Wondertan
Copy link
Member

Wondertan commented Dec 23, 2022

Right now, we define there a custom mockStore, which is basically a copy of existing reusable mock

@Wondertan Wondertan added good first issue Good for newcomers area:fraud kind:testing Related to unit tests labels Dec 23, 2022
@richardgreg
Copy link
Contributor

Hi, I'd like to work on this

@richardgreg
Copy link
Contributor

Hi, sorry this is taking a minute. I am new to GO, and I come from a Python background. So you can understand there's quite a lot I must learn and unlearn.

I think I understand the problem and what's expected of me: in header/mocks/store, there's a struct MockStore. I should import and use that in fraud/testing instead of the custom mockStore.

@Wondertan
Copy link
Member Author

Exactly @richardgreg

@richardgreg
Copy link
Contributor

@Wondertan, a new PR (7a2f03202afcaf9eef91f8371f78bd939a41e3a57fea6a51e42c60ec1ccdebda) has made modifications to header/mocks.Store. I'll need to import libs/header to use the new generic mockStore. This new header pkg does not have ExtendedHeader

richardgreg added a commit to richardgreg/celestia-node that referenced this issue Feb 1, 2023
This change modifies the test file in the fraud pkg to make use of
mockStore in libs/header/mocks.

Fixes: celestiaorg#1542

Signed-off-by: Richard Gregory <richardgrecoson@gmail.com>
@Wondertan
Copy link
Member Author

Closed by #2039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fraud good first issue Good for newcomers kind:testing Related to unit tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants