mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Enable usestdlibvars linter and fix findings (#13339)
Co-authored-by: terence <terence@prysmaticlabs.com>
This commit is contained in:
@@ -142,7 +142,7 @@ func (w *Web3RemoteSigner) Stop() error {
|
||||
func (w *Web3RemoteSigner) monitorStart() {
|
||||
client := &http.Client{}
|
||||
for {
|
||||
req, err := http.NewRequestWithContext(w.ctx, "GET", fmt.Sprintf("http://localhost:%d/upcheck", Web3RemoteSignerPort), nil)
|
||||
req, err := http.NewRequestWithContext(w.ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/upcheck", Web3RemoteSignerPort), nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -172,7 +172,7 @@ func (w *Web3RemoteSigner) PublicKeys(ctx context.Context) ([]bls.PublicKey, err
|
||||
w.wait(ctx)
|
||||
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("http://localhost:%d/api/v1/eth2/publicKeys", Web3RemoteSignerPort), nil)
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("http://localhost:%d/api/v1/eth2/publicKeys", Web3RemoteSignerPort), nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -180,7 +180,7 @@ func (w *Web3RemoteSigner) PublicKeys(ctx context.Context) ([]bls.PublicKey, err
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res.StatusCode != 200 {
|
||||
if res.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("returned status code %d", res.StatusCode)
|
||||
}
|
||||
b, err := io.ReadAll(res.Body)
|
||||
|
||||
Reference in New Issue
Block a user