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

refactor: rename StateProvider structs #663

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

TechieBoy
Copy link
Contributor

Made all StateProvider Impls have a consistent name.
StateProviderImplHistory -> HistoricalStateProvider
StateProviderImplLatest -> LatestStateProvider

StateProviderImplRefHistory -> HistoricalStateProviderRef
StateProviderImplRefLatest -> LatestStateProviderRef

Closes #639

@codecov-commenter
Copy link

Codecov Report

Merging #663 (bacc65e) into main (f5ae970) will not change coverage.
The diff coverage is 16.66%.

@@           Coverage Diff           @@
##             main     #663   +/-   ##
=======================================
  Coverage   71.99%   71.99%           
=======================================
  Files         260      260           
  Lines       26264    26264           
=======================================
  Hits        18909    18909           
  Misses       7355     7355           
Flag Coverage Δ
unit-tests 71.99% <16.66%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
crates/storage/provider/src/db_provider.rs 100.00% <ø> (ø)
crates/storage/provider/src/lib.rs 100.00% <ø> (ø)
crates/storage/provider/src/db_provider/storage.rs 19.09% <9.09%> (ø)
crates/stages/src/stages/execution.rs 89.38% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

lgtm afa this PR's concerned. on a sidenote, i'd investigate if we can get rid of the *Ref providers, seems like unnecessary duplication at first glance

@gakonst
Copy link
Member

gakonst commented Dec 30, 2022

Yeah that's what I thought as well re Ref. @rakita was there any reason?

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Nice thanks!

@rakita
Copy link
Collaborator

rakita commented Dec 30, 2022

I didnt want to drop transaction after Provider is done, so I made wrapper that takes Ref.

Probably can be done with fn take(self) that would return internal transaction

@gakonst gakonst merged commit 24d5612 into paradigmxyz:main Dec 30, 2022
@TechieBoy TechieBoy deleted the rename-sp branch January 1, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename StateProviderImplHistory to HistoricalStateProvider
5 participants