From f8abd9927fb0e6ffdc736b346c22da1752b8d5bc Mon Sep 17 00:00:00 2001 From: stellrust Date: Tue, 16 Jul 2024 12:04:12 +0900 Subject: [PATCH] chore: fix some comments (#11170) Signed-off-by: stellrust --- cl/beacon/beacontest/harness_test_data.yml | 2 +- cl/beacon/handler/builder.go | 2 +- cl/beacon/handler/validator_registration.go | 2 +- cl/beacon/router.go | 2 +- cl/sentinel/httpreqresp/server.go | 4 ++-- erigon-lib/commitment/hex_patricia_hashed_test.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cl/beacon/beacontest/harness_test_data.yml b/cl/beacon/beacontest/harness_test_data.yml index 4c307021986..734b26c525b 100644 --- a/cl/beacon/beacontest/harness_test_data.yml +++ b/cl/beacon/beacontest/harness_test_data.yml @@ -43,7 +43,7 @@ tests: hello: worlds compare: expr: "actual != expect" - - name: "key order doesnt matter for non literal" + - name: "key order doesn't matter for non literal" expect: data: a: 1 diff --git a/cl/beacon/handler/builder.go b/cl/beacon/handler/builder.go index 92e552e0f47..d6b1b0a39aa 100644 --- a/cl/beacon/handler/builder.go +++ b/cl/beacon/handler/builder.go @@ -102,7 +102,7 @@ func (a *ApiHandler) PostEthV1BuilderRegisterValidator(w http.ResponseWriter, r return nil, beaconhttp.NewEndpointError(http.StatusInternalServerError, err) } for _, v := range registerReq { - a.logger.Debug("[Caplin] Registred new validator", "fee_recipient", v.Message.FeeRecipient) + a.logger.Debug("[Caplin] Registered new validator", "fee_recipient", v.Message.FeeRecipient) } log.Info("Registered new validator", "count", len(registerReq)) return newBeaconResponse(nil), nil diff --git a/cl/beacon/handler/validator_registration.go b/cl/beacon/handler/validator_registration.go index b12e3f5ac42..05aeee0b630 100644 --- a/cl/beacon/handler/validator_registration.go +++ b/cl/beacon/handler/validator_registration.go @@ -36,7 +36,7 @@ func (a *ApiHandler) PostEthV1ValidatorPrepareBeaconProposal(w http.ResponseWrit return } for _, v := range req { - a.logger.Debug("[Caplin] Registred new validator", "index", v.ValidatorIndex, "fee_recipient", v.FeeRecipient.String()) + a.logger.Debug("[Caplin] Registered new validator", "index", v.ValidatorIndex, "fee_recipient", v.FeeRecipient.String()) a.validatorParams.SetFeeRecipient(v.ValidatorIndex, v.FeeRecipient) } w.WriteHeader(http.StatusOK) diff --git a/cl/beacon/router.go b/cl/beacon/router.go index 1d118d4f4e5..275c44034fb 100644 --- a/cl/beacon/router.go +++ b/cl/beacon/router.go @@ -58,7 +58,7 @@ func ListenAndServe(beaconHandler *LayeredBeaconHandler, routerCfg beacon_router beaconHandler.ArchiveApi.ServeHTTP(w, r) log.Debug("[Beacon API] Request", "uri", r.URL.String(), "path", r.URL.Path, "time", time.Since(start)) } else { - log.Warn("[Beacon API] Request to unavaiable endpoint, check --beacon.api flag", "uri", r.URL.String(), "path", r.URL.Path) + log.Warn("[Beacon API] Request to unavailable endpoint, check --beacon.api flag", "uri", r.URL.String(), "path", r.URL.Path) } }) mux.NotFound(func(w http.ResponseWriter, r *http.Request) { diff --git a/cl/sentinel/httpreqresp/server.go b/cl/sentinel/httpreqresp/server.go index 76e4deca28f..8f4bed85726 100644 --- a/cl/sentinel/httpreqresp/server.go +++ b/cl/sentinel/httpreqresp/server.go @@ -77,7 +77,7 @@ func NewRequestHandler(host host.Host) http.HandlerFunc { if chunks < 1 { chunks = 1 } - // idk why this would happen, so lets make sure it doesnt. future-proofing from bad input + // idk why this would happen, so lets make sure it doesn't. future-proofing from bad input if chunks > 512 { chunks = 512 } @@ -116,7 +116,7 @@ func NewRequestHandler(host host.Host) http.HandlerFunc { http.Error(w, "Read Code: "+err.Error(), http.StatusBadRequest) return } - // this is not neccesary, but seems like the right thing to do + // this is not necessary, but seems like the right thing to do w.Header().Set("CONTENT-TYPE", "application/octet-stream") w.Header().Set("CONTENT-ENCODING", "snappy/stream") // add the response code & headers diff --git a/erigon-lib/commitment/hex_patricia_hashed_test.go b/erigon-lib/commitment/hex_patricia_hashed_test.go index c19dfd53a0f..48ac903e065 100644 --- a/erigon-lib/commitment/hex_patricia_hashed_test.go +++ b/erigon-lib/commitment/hex_patricia_hashed_test.go @@ -544,7 +544,7 @@ func Test_Cell_EncodeDecode(t *testing.T) { require.EqualValues(t, first.spk[:], second.spk[:]) require.EqualValues(t, first.h[:], second.h[:]) require.EqualValues(t, first.extension[:first.extLen], second.extension[:second.extLen]) - // encode doesnt code Nonce, Balance, CodeHash and Storage + // encode doesn't code Nonce, Balance, CodeHash and Storage require.EqualValues(t, first.Delete, second.Delete) }