beacon: fix lints

This commit is contained in:
lightclient 2024-01-05 19:48:55 -07:00
parent c63e8c58bc
commit e1b5757365
No known key found for this signature in database
GPG key ID: 75C916AFEE20183E
3 changed files with 2 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -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()