-
Notifications
You must be signed in to change notification settings - Fork 210
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
chore(api): Add UTs for validators APIs #2519
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## node-api-validators #2519 +/- ##
=======================================================
+ Coverage 32.04% 32.73% +0.68%
=======================================================
Files 351 351
Lines 15801 15842 +41
Branches 20 20
=======================================================
+ Hits 5064 5186 +122
+ Misses 10374 10272 -102
- Partials 363 384 +21
|
1524f0a
to
50fc5fa
Compare
50fc5fa
to
9c6c847
Compare
9c6c847
to
020b9b7
Compare
020b9b7
to
4fe2b10
Compare
4fe2b10
to
e5cd7c2
Compare
e5cd7c2
to
362c64b
Compare
362c64b
to
67bd313
Compare
67bd313
to
d0cf104
Compare
d0cf104
to
652a7b6
Compare
652a7b6
to
86aa98c
Compare
86aa98c
to
7baf871
Compare
7baf871
to
447182e
Compare
Signed-off-by: aBear <abear@berachain.com>
447182e
to
81e3de2
Compare
@@ -73,3 +75,45 @@ func ValidatorFromConsensus(v *ctypes.Validator) *Validator { | |||
WithdrawableEpoch: v.GetWithdrawableEpoch().Base10(), | |||
} | |||
} | |||
|
|||
// useful in UTs | |||
func ValidatorToConsensus(v *Validator) (*ctypes.Validator, error) { |
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.
TODO: add property tests to ensure ValidatorToConsensus
and ValidatorFromConsensus
are dual
Added much needed unit tests around FilterValidators