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

Accept a Common object when constructing the VM and pass it when copying it #525

Merged
merged 4 commits into from
May 28, 2019

Conversation

alcuadrado
Copy link
Member

Previous to this PR copying a VM always returned one with a Common object set to mainnet and Petersburg. It now passes the chain and hardfork info when copying it.

@alcuadrado
Copy link
Member Author

On second thought, the VM should probably accept an optional Common, like Transaction does now. This would let users use a custom Common.

If we do that, copy() should pass that instead of chain and hardfork.

@coveralls
Copy link

coveralls commented May 27, 2019

Coverage Status

Coverage increased (+0.1%) to 95.127% when pulling f0a0ed0 on pass-hardfork-and-chain into 176058b on master.

@holgerd77
Copy link
Member

@alcuadrado Yes, that's a good idea to unify the API here. Can you rebase the PR and re-purpose to that and expand the VM constructor with Common and then pass the Common instance?

@alcuadrado alcuadrado changed the title Pass hardfork and chain when copying a VM Accept a Common object when constructing the VM and pass it when copying it May 28, 2019
@alcuadrado
Copy link
Member Author

Made the changes mentioned above. This is ready to review now.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Looks good!

@holgerd77 holgerd77 merged commit 59c3133 into master May 28, 2019
@holgerd77 holgerd77 deleted the pass-hardfork-and-chain branch May 28, 2019 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants