From e1b5757365030ca895ada4670f900f5c5cc979e9 Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 5 Jan 2024 19:48:55 -0700 Subject: [PATCH] beacon: fix lints --- beacon/beaclient/client.go | 1 - beacon/light/chain.go | 2 +- beacon/light/chain_test.go | 18 +----------------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/beacon/beaclient/client.go b/beacon/beaclient/client.go index cfb893a93b..cb416757be 100644 --- a/beacon/beaclient/client.go +++ b/beacon/beaclient/client.go @@ -97,7 +97,6 @@ func (c *Client) GetRangeUpdate(start, count int) ([]*types.LightClientUpdate, e return nil, err } return u, nil - } // GetOptimisticUpdate retrieves the latest available optimistic update from the diff --git a/beacon/light/chain.go b/beacon/light/chain.go index 0ff3859402..bdc666d076 100644 --- a/beacon/light/chain.go +++ b/beacon/light/chain.go @@ -34,7 +34,7 @@ import ( ) // LightClient tracks the head of the chain using the light client protocol, -// which assumes the majority of beacon chain sync committe is honest. +// which assumes the majority of beacon chain sync committee is honest. type LightClient struct { beacon *beaclient.Client store *store diff --git a/beacon/light/chain_test.go b/beacon/light/chain_test.go index 4ce2a73628..6e7e268986 100644 --- a/beacon/light/chain_test.go +++ b/beacon/light/chain_test.go @@ -143,22 +143,6 @@ func newSyncCommitteeSigner() *syncCommitteeSigner { return c } -func (c *syncCommitteeSigner) shuffledCommittee() ([]int, []*bls.SecretKey) { - var ( - shuffled []*bls.SecretKey - indexes []int - ) - for i, m := range c.members { - shuffled = append(shuffled, m) - indexes = append(indexes, i) - } - mrand.Shuffle(len(shuffled), func(i, j int) { - shuffled[i], shuffled[j] = shuffled[j], shuffled[i] - indexes[i], indexes[j] = indexes[j], indexes[i] - }) - return indexes, shuffled -} - func (c *syncCommitteeSigner) signHeader(header *types.Header, quorum float32) types.SyncAggregate { var ( count = int(quorum * float32(params.SyncCommitteeSize)) @@ -326,7 +310,7 @@ func runTest(t *testing.T, tt *test, i int) { } if update.NextSyncCommittee != nil { if tt.store.next == nil { - t.Fatalf("test %d: expected next sync committe set, but found nil", i) + t.Fatalf("test %d: expected next sync committee set, but found nil", i) } var ( have = tt.store.next.Aggregate.Serialize()