Skip to content

Commit

Permalink
renaming based on kasey's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
james-prysm committed Jul 19, 2024
1 parent 74ffc00 commit 704bee6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions proto/engine/v1/execution_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package enginev1

import "github.com/prysmaticlabs/prysm/v5/encoding/bytesutil"

type Cloneable[T any] interface {
type Copier[T any] interface {
Copy() T
}

func copySlice[T any, C Cloneable[T]](original []C) []T {
func copySlice[T any, C Copier[T]](original []C) []T {
// Create a new slice with the same length as the original
newSlice := make([]T, len(original))
for i := 0; i < len(newSlice); i++ {
Expand Down
4 changes: 2 additions & 2 deletions proto/engine/v1/execution_engine_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
)

func TestCopyExecutionPayload_Fuzz(t *testing.T) {
fuzzCloneable(t, &enginev1.ExecutionPayloadElectra{})
fuzzCopies(t, &enginev1.ExecutionPayloadElectra{})
}

func fuzzCloneable[T any, C enginev1.Cloneable[T]](t *testing.T, obj C) {
func fuzzCopies[T any, C enginev1.Copier[T]](t *testing.T, obj C) {
fuzzer := fuzz.NewWithSeed(0)
amount := 1000
t.Run(fmt.Sprintf("%T", obj), func(t *testing.T) {
Expand Down

0 comments on commit 704bee6

Please sign in to comment.