mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
beacon: fix lints
This commit is contained in:
parent
c63e8c58bc
commit
e1b5757365
3 changed files with 2 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue