-
Notifications
You must be signed in to change notification settings - Fork 995
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
Add proposer gRPC suppot for Electra #13984
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ func Test_getEmptyBlock(t *testing.T) { | |
config.BellatrixForkEpoch = 2 | ||
config.CapellaForkEpoch = 3 | ||
config.DenebForkEpoch = 4 | ||
config.ElectraForkEpoch = 5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you document the effect of setting these fork epoch values? I assume the point here is just to set the highest epoch to something that won't overflow (when it is set to max uint) and making sure these epochs don't conflict with each other. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just so we can test the conditions. Here is how it's used in the test case: |
||
params.OverrideBeaconConfig(config) | ||
|
||
tests := []struct { | ||
|
@@ -61,6 +62,15 @@ func Test_getEmptyBlock(t *testing.T) { | |
return b | ||
}, | ||
}, | ||
{ | ||
name: "electra", | ||
slot: primitives.Slot(params.BeaconConfig().ElectraForkEpoch) * params.BeaconConfig().SlotsPerEpoch, | ||
want: func() interfaces.ReadOnlySignedBeaconBlock { | ||
b, err := blocks.NewSignedBeaconBlock(ðpb.SignedBeaconBlockElectra{Block: ðpb.BeaconBlockElectra{Body: ðpb.BeaconBlockBodyElectra{}}}) | ||
require.NoError(t, err) | ||
return b | ||
}, | ||
}, | ||
} | ||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
|
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 know this is just repeating the existing pattern, but this switch feels upside down. Typically we write this kind of type switch where the inequality is the other way: