context.Context should be the first parameter of a function
488// validator private keys.
489func DeterministicGenesisStateWithGenesisBlock(
490 t *testing.T,
491 ctx context.Context,492 db iface.HeadAccessDatabase,
493 numValidators uint64,
494) (state.BeaconState, [32]byte, []bls.SecretKey) {
Description
context.Context
should be the first parameter of a function.
Bad practice
func badPatternFunc(k favContextKey, ctx context.Context) {
// do something
}
Recommended
func goodPatternFunc(ctx context.Context, k favContextKey) {
// do something
}