Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

auto run + contructor return arc #562

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Conversation

0xJepsen
Copy link
Collaborator

@0xJepsen 0xJepsen commented Oct 2, 2023

This PR Closes #560

It also modifies the RevmMiddleware Constructor to return an Arc<RevmMiddleware> To improve the ease of use a bit since i don't believe there is a time in which we don't do this.

This does also have passing tests, clippy, and fmt

@0xJepsen 0xJepsen requested a review from Autoparallel October 2, 2023 19:57
@0xJepsen 0xJepsen linked an issue Oct 2, 2023 that may be closed by this pull request
Copy link
Contributor

@Alexangelj Alexangelj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason we didn't wrap it in Arc before?

Changes look good to me.

Also (for posterity) we are fixing one of the recent merges from main in this branch:
broken: https://github.com/primitivefinance/arbiter/blob/1e4988381f4050aef86fc610977990a3f630d1b3/arbiter-core/src/environment/mod.rs#L174
working: https://github.com/primitivefinance/arbiter/blob/9e26acbfb7ff95fedb8e1a212cda15302e95f506/arbiter-core/src/environment.rs#L297

Ty for fixing

@Autoparallel
Copy link
Collaborator

Is there any reason we didn't wrap it in Arc before?

Typically new() methods return Self. So it is a bit odd to -> Arc<Self>

However, in this case there is no reason to do it otherwise.

Copy link
Collaborator

@Autoparallel Autoparallel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good cleanup

looking forward to writing less code for sims

@0xJepsen 0xJepsen merged commit 1928c96 into feat(arbiter-core)/v0.6.0 Oct 2, 2023
@0xJepsen 0xJepsen deleted the auto_run_env branch October 10, 2023 18:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Autostart the environment upon creation.
3 participants