-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ETH2 Types: Epoch #8373
ETH2 Types: Epoch #8373
Conversation
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.
I went through every single file carefully and this PR is good to go, did not find anything contentious
😱prysm/endtoend/helpers/epochTimer.go Line 55 in f9303ca
|
That's a misnomer, what is there is actually a slot number (I've that as |
@@ -115,6 +117,12 @@ func deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) boo | |||
} | |||
return true | |||
case reflect.Uint64: | |||
switch v1.Type().Name() { | |||
case "Epoch": | |||
return v1.Interface().(types.Epoch) == v2.Interface().(types.Epoch) |
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.
For deep value assertions to work shouldn't uint64
and types.Epoch
be equal ? This makes it only equal if they are of types.Epoch
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.
Well, if we are comparing epochs, both should be epochs, imo. While underlying type of Epoch is uint64, and their integral values are the same, I believe if sth is epoch, it should be typed correctly, or not be considered as equal.
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.
Fair enough, the deep equal is only used in our pending queue while comparing the same type, so not a big issue. Its fine in that case.
Note: Per Nishant's request will sync from genesis and run some validators on top of this branch. If everything works, will merge this PR. |
a24c3b4
Codecov Report
@@ Coverage Diff @@
## develop #8373 +/- ##
==========================================
Coverage ? 58.03%
==========================================
Files ? 454
Lines ? 32212
Branches ? 0
==========================================
Hits ? 18695
Misses ? 10657
Partials ? 2860 |
What type of PR is this?
What does this PR do? Why is it needed?
types.Epoch
.Which issues(s) does this PR fix?
Part of #8205
Other notes for review