-
Notifications
You must be signed in to change notification settings - Fork 78
[ETCM-943] partially split reading part of Blockchain #1022
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
7f44df2 to
13c47db
Compare
src/it/scala/io/iohk/ethereum/txExecTest/util/DumpChainApp.scala
Outdated
Show resolved
Hide resolved
| } | ||
| import io.iohk.ethereum.mpt.MptNode | ||
|
|
||
| class BlockchainReader( |
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.
would the next step be to create a trait BlockchainReader to allow for easier stubbing?
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.
Yes I agree. In the end we might split it further and have several reader traits.
da39ad5 to
a9a194a
Compare
…o BlockchainReader
… BlockchainHostActor dependencies
a9a194a to
e54ad4f
Compare
d3bc48d to
3b4a0cd
Compare
Description
The goal of this PR is to put the read only part of
Blockchainin another class in order to reduce the dependency on this class. As a target I choose to makeBlockchainHostActorindependent ofBlockchain.I moved a few function inside a new class named
BlockchainReaderfor consistency, but we could come up with another name.It allowed to remove
Blockchainat some other places but there are still read only methods that can be moved to go further. But as it is already a big change we should at least validate this before continuing.review
This is a big change, but mostly moving things around. Each commit can be viewed one by one and is mergeable, so we can split this PR if needed
One important thing to think about is : does the change help us for a future refactoring ? I don't necessarily see
BlockchainReaderas a final target for the structure of the code, but more as step to help us refactor step by step.