mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Remove unused code (#8517)
* Remove unused code * Go mod tidy * Gazelle Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
1
go.mod
1
go.mod
@@ -34,7 +34,6 @@ require (
|
||||
github.com/golang/snappy v0.0.2
|
||||
github.com/google/gofuzz v1.2.0
|
||||
github.com/google/gopacket v1.1.19 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||
github.com/google/uuid v1.2.0
|
||||
github.com/graph-gophers/graphql-go v0.0.0-20200309224638-dae41bde9ef9 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
|
||||
|
||||
2
go.sum
2
go.sum
@@ -375,8 +375,6 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
|
||||
@@ -6,7 +6,6 @@ go_library(
|
||||
srcs = ["browser.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/shared/browser",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_google_shlex//:go_default_library"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
|
||||
@@ -8,8 +8,6 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/google/shlex"
|
||||
)
|
||||
|
||||
// ForOS produces an exec.Cmd to open the web browser for different OS
|
||||
@@ -32,16 +30,3 @@ func ForOS(goos, url string) *exec.Cmd {
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd
|
||||
}
|
||||
|
||||
// FromLauncher parses the launcher string based on shell splitting rules
|
||||
func FromLauncher(launcher, url string) (*exec.Cmd, error) {
|
||||
args, err := shlex.Split(launcher)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
args = append(args, url)
|
||||
cmd := exec.Command(args[0], args[1:]...)
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd, nil
|
||||
}
|
||||
|
||||
@@ -326,11 +326,6 @@ func BytesToEpochBigEndian(b []byte) types.Epoch {
|
||||
return types.Epoch(BytesToUint64BigEndian(b))
|
||||
}
|
||||
|
||||
// SlotToBytesLittleEndian conversion.
|
||||
func SlotToBytesLittleEndian(i types.Slot) []byte {
|
||||
return Uint64ToBytesLittleEndian(uint64(i))
|
||||
}
|
||||
|
||||
// SlotToBytesBigEndian conversion.
|
||||
func SlotToBytesBigEndian(i types.Slot) []byte {
|
||||
return Uint64ToBytesBigEndian(uint64(i))
|
||||
|
||||
@@ -33,14 +33,6 @@ import (
|
||||
const (
|
||||
keyHeaderKDF = "scrypt"
|
||||
|
||||
// StandardScryptN is the N parameter of Scrypt encryption algorithm, using 256MB
|
||||
// memory and taking approximately 1s CPU time on a modern processor.
|
||||
StandardScryptN = 1 << 18
|
||||
|
||||
// StandardScryptP is the P parameter of Scrypt encryption algorithm, using 256MB
|
||||
// memory and taking approximately 1s CPU time on a modern processor.
|
||||
StandardScryptP = 1
|
||||
|
||||
// LightScryptN is the N parameter of Scrypt encryption algorithm, using 4MB
|
||||
// memory and taking approximately 100ms CPU time on a modern processor.
|
||||
LightScryptN = 1 << 12
|
||||
|
||||
@@ -765,7 +765,7 @@ func TestGetGraffitiOrdered_Ok(t *testing.T) {
|
||||
Default: "d",
|
||||
},
|
||||
}
|
||||
for _, want := range [][]byte{[]byte{'a'}, []byte{'b'}, []byte{'c'}, []byte{'d'}, []byte{'d'}} {
|
||||
for _, want := range [][]byte{{'a'}, {'b'}, {'c'}, {'d'}, {'d'}} {
|
||||
got, err := v.getGraffiti(context.Background(), pubKey)
|
||||
require.NoError(t, err)
|
||||
require.DeepEqual(t, want, got)
|
||||
|
||||
@@ -33,14 +33,6 @@ func (m *mockGenesisFetcher) GenesisInfo(_ context.Context) (*ethpb.Genesis, err
|
||||
}, nil
|
||||
}
|
||||
|
||||
type mockBeaconInfoFetcher struct {
|
||||
endpoint string
|
||||
}
|
||||
|
||||
func (m *mockBeaconInfoFetcher) BeaconLogsEndpoint(_ context.Context) (string, error) {
|
||||
return m.endpoint, nil
|
||||
}
|
||||
|
||||
func TestServer_GetBeaconNodeConnection(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
endpoint := "localhost:90210"
|
||||
|
||||
Reference in New Issue
Block a user