From 039e53ca0920904b37e329dbc76dab60d504ffc9 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Tue, 30 Apr 2024 15:58:06 -0500 Subject: [PATCH] Fix TestMinSpanChunksSlice_CheckSlashable --- beacon-chain/slasher/chunks_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/beacon-chain/slasher/chunks_test.go b/beacon-chain/slasher/chunks_test.go index ba52d21efb74..7fc1ab7a6501 100644 --- a/beacon-chain/slasher/chunks_test.go +++ b/beacon-chain/slasher/chunks_test.go @@ -115,11 +115,11 @@ func TestMinSpanChunksSlice_CheckSlashable(t *testing.T) { // based on our min chunk for either validator. slashing, err := chunk.CheckSlashable(ctx, slasherDB, validatorIdx, att) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) slashing, err = chunk.CheckSlashable(ctx, slasherDB, validatorIdx.Sub(1), att) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) // Next up we initialize an empty chunks slice and mark an attestation // with (source 1, target 2) as attested. @@ -141,7 +141,7 @@ func TestMinSpanChunksSlice_CheckSlashable(t *testing.T) { slashing, err = chunk.CheckSlashable(ctx, slasherDB, validatorIdx, surroundingVote) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) // Next up, we save the old attestation record, then check if the // surrounding vote is indeed slashable. @@ -193,11 +193,11 @@ func TestMaxSpanChunksSlice_CheckSlashable(t *testing.T) { // based on our max chunk for either validator. slashing, err := chunk.CheckSlashable(ctx, slasherDB, validatorIdx, att) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) slashing, err = chunk.CheckSlashable(ctx, slasherDB, validatorIdx.Sub(1), att) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) // Next up we initialize an empty chunks slice and mark an attestation // with (source 0, target 3) as attested. @@ -219,7 +219,7 @@ func TestMaxSpanChunksSlice_CheckSlashable(t *testing.T) { slashing, err = chunk.CheckSlashable(ctx, slasherDB, validatorIdx, surroundedVote) require.NoError(t, err) - require.Equal(t, (*ethpb.AttesterSlashing)(nil), slashing) + require.Equal(t, nil, slashing) // Next up, we save the old attestation record, then check if the // surroundedVote vote is indeed slashable.