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

Fix offchain workers and add tests #1409

Merged
merged 10 commits into from
Sep 15, 2021

Conversation

ferrell-code
Copy link
Contributor

@ferrell-code ferrell-code commented Sep 11, 2021

Closes #1405

Fixes auction-manager and cdp-engine offchain workers and adds tests

@ferrell-code ferrell-code marked this pull request as draft September 11, 2021 05:55
@ferrell-code ferrell-code marked this pull request as ready for review September 13, 2021 19:16
@ferrell-code
Copy link
Contributor Author

ferrell-code commented Sep 13, 2021

Now there are unit tests so no one else can break it :)

Edit: I believe these are the only two off-chain workers in our code base, I would add test to others but I think these are it

@xlc xlc requested a review from wangjj9219 September 13, 2021 22:07
xlc
xlc previously approved these changes Sep 14, 2021
@ferrell-code
Copy link
Contributor Author

ferrell-code commented Sep 14, 2021

Don't merge this yet, key still doesn't work to continue iterator from where it left off, I will add to tests so it fails in that case, when I figure out how to fix it

Edit: Okay is good on my end now, the iterator now correctly starts where it left off for when the raw key is stored in offchain storage

@xlc xlc self-requested a review September 14, 2021 06:13
@xlc xlc enabled auto-merge (squash) September 15, 2021 09:55
@xlc xlc disabled auto-merge September 15, 2021 10:35
@xlc xlc enabled auto-merge (squash) September 15, 2021 10:35
@xlc xlc disabled auto-merge September 15, 2021 10:35
@xlc xlc merged commit 98b2b67 into AcalaNetwork:master Sep 15, 2021
@ferrell-code ferrell-code deleted the fer-offchain-fix-tests branch September 15, 2021 16:46
xlc pushed a commit that referenced this pull request Sep 19, 2021
* fix offchain worker and add tests

* offchain worker tests wip

* finish cdp-engine test

* test max iterations

* remove dbg!

* add auction manager tests

* make None into DEFAULT_MAX_ITERATIONS

* add test for when max iterations is none

* key sets correctly for iterator
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.

Unit tests for offchain workers
2 participants