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

rpcdaemon: refactoring ContextTestBase as infra test utility #2127

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented Jun 19, 2024

This PR splits rpc::test:: ContextTestBase into two different test utility abstractions:

  • silkworm::test_util:: ContextTestBase in infra module
  • silkworm::rpc::test_util::ServiceContextTestBase in rpc module

in order to remove any dependency of rpc/storage package from rpc/test_util, as a preparation step to then move storage package in db module.

After this PR, the only remaining rpc/storage dependencies in rpc are from ether::kv::Transaction and rpc::test::MockTransaction, which will be moved together with storage.

Extras

  • move kEarliestBlockNumber definition from rpc to core to break dependency of rpc/storage package from rpc/core
  • rename some namespace test as test_util for naming consistency

@canepat canepat added maintenance Some maintenance work (fix, refactor, rename, test...) unit testing Facilities for unit testing labels Jun 19, 2024
@lupin012 lupin012 marked this pull request as ready for review June 19, 2024 19:56
@canepat canepat merged commit adc984a into master Jun 19, 2024
5 checks passed
@canepat canepat deleted the rpcdaemon_refactor_context_test_base_to_infra branch June 19, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Some maintenance work (fix, refactor, rename, test...) unit testing Facilities for unit testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants