-
Notifications
You must be signed in to change notification settings - Fork 677
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: move EpochManager functions as default impl for EpochManagerAdapter #12851
Conversation
possible_epochs_of_height_around_tip
as default impleb3e3ad
to
ed9682e
Compare
@@ -239,7 +253,7 @@ pub trait EpochManagerAdapter: Send + Sync { | |||
/// it for "production" code. | |||
fn get_validator_info( | |||
&self, | |||
epoch_id: ValidatorInfoIdentifier, | |||
epoch_identifier: ValidatorInfoIdentifier, |
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.
why rename
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.
epoch_id
usually corresponds to a variable of type EpochId
in this file, so renaming to avoid confusing
a0c0f69
to
a8e0051
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12851 +/- ##
==========================================
- Coverage 70.39% 70.38% -0.01%
==========================================
Files 853 853
Lines 174093 174006 -87
Branches 174093 174006 -87
==========================================
- Hits 122548 122473 -75
+ Misses 46324 46317 -7
+ Partials 5221 5216 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
a8e0051
to
279d62b
Compare
@Longarithm just FYU I've pushed quite a few changes after your approval, so maybe you would like to take another look |
This PR moves implementation for a bunch of functions from
EpochManager
to be the default implementation inEpochManagerAdapter
trait.Also
is_slashed
is removed from the API since we do not properly support slashing.