-
Notifications
You must be signed in to change notification settings - Fork 830
Remove blockchain from stateManager #328
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
Conversation
I think on a first look this makes a lot of sense. @holgerd77 @vpulim any comments? |
Looks great to me. I'm a big fan of simplifying the StateManager interface. |
@holgerd77 Yes, code changes LGTM. There is a possibility this breaks upstream dependencies that access stateManager.blockchain directly so maybe make this clear in the release notes or elsewhere? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed by @vpulim, will approve.
57ce17c
to
3508ce0
Compare
Hi Matthew @mattdean-digicatapult, rebased this for (your 😄) convenience, if you prefer to always do this yourself let me know for next time. |
np @holgerd77, thanks for doing the rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tests pass.
This is part of the broader discussion in #268 and #309 so readers should probably start there.
The basic premise is that
getBlockHash
should not be onstateManager
. This is the only block property that is present onstateManager
and it doesn't really fit. Removing this also means the ctor doesn't need to take a blockchain which simplifies the interface as per #268.