Move FakeBlockTracker to eth-block-tracker (as MockPollingBlockTracker) - #10121
Draft
mcmire wants to merge 1 commit into
Draft
Move FakeBlockTracker to eth-block-tracker (as MockPollingBlockTracker)#10121mcmire wants to merge 1 commit into
mcmire wants to merge 1 commit into
Conversation
`FakeBlockTracker` is a class defined in a top-level test helper file which provides a mock implementation of the `PollingBlockTracker` class in `eth-block-tracker`. Because this file uses types from `eth-block-tracker`, any package that wants to use `FakeBlockTracker` needs to depend on this package. `controller-utils` is such a package, and so it and `eth-block-tracker` are actually circular. That will create a problem when we try to add typechecking to all packages in CI. To address this and prevent future issues, we move `FakeBlockTracker` — now `MockPollingBlockTracker` — into `eth-block-tracker`, and we change all callsites to match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
FakeBlockTrackeris a class defined in a top-level test helper file which provides a mock implementation of thePollingBlockTrackerclass ineth-block-tracker. Because this file uses types frometh-block-tracker, any package that wants to useFakeBlockTrackerneeds to depend on this package.controller-utilsis such a package, and so it andeth-block-trackerare actually circular. That will create a problem when we try to add typechecking to all packages in CI.To address this and prevent future issues, we move
FakeBlockTracker— nowMockPollingBlockTracker— intoeth-block-tracker, and we change all callsites to match.References
Checklist