Skip to content

Commit

Permalink
Fix TestMinSpanChunksSlice_CheckSlashable
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvanloon committed Apr 30, 2024
1 parent c326dff commit 039e53c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions beacon-chain/slasher/chunks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 039e53c

Please sign in to comment.