Skip to content

Commit

Permalink
Few a few minor things (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored Sep 27, 2022
1 parent b2c3873 commit 025acf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (

const (
genesisForkVersionMainnet = "0x00000000"
genesisForkVersionKiln = "0x70000069" // https://github.com/eth-clients/merge-testnets/blob/main/kiln/config.yaml#L10
genesisForkVersionRopsten = "0x80000069"
genesisForkVersionSepolia = "0x90000069"
genesisForkVersionGoerli = "0x00001020"
)
Expand Down Expand Up @@ -136,17 +134,17 @@ func Main() {
RequestTimeoutGetPayload: time.Duration(*relayTimeoutMsGetPayload) * time.Millisecond,
RequestTimeoutRegVal: time.Duration(*relayTimeoutMsRegVal) * time.Millisecond,
}
server, err := server.NewBoostService(opts)
service, err := server.NewBoostService(opts)
if err != nil {
log.WithError(err).Fatal("failed creating the server")
}

if *relayCheck && server.CheckRelays() == 0 {
if *relayCheck && service.CheckRelays() == 0 {
log.Error("no relay passed the health-check!")
}

log.Println("listening on", *listenAddr)
log.Fatal(server.StartHTTPServer())
log.Fatal(service.StartHTTPServer())
}

func getEnv(key, defaultValue string) string {
Expand Down
2 changes: 1 addition & 1 deletion cmd/test-cli/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func sendForkchoiceUpdate(engineEndpoint string, block engineBlockData) error {
log.WithField("hash", block.Hash).Info("sending FCU")
params := []any{
forkchoiceState{block.Hash, block.Hash, block.Hash},
payloadAttributes{hexutil.Uint64(block.Timestamp + 1), common.Hash{0x01}, common.Address{0x02}},
payloadAttributes{block.Timestamp + 1, common.Hash{0x01}, common.Address{0x02}},
}
payload := map[string]any{"id": 67, "jsonrpc": "2.0", "method": "engine_forkchoiceUpdatedV1", "params": params}
return sendJSONRequest(engineEndpoint, payload, nil)
Expand Down
2 changes: 1 addition & 1 deletion server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (m *BoostService) sendValidatorRegistrationsToRelayMonitors(payload []types
go func(relayMonitor *url.URL) {
url := GetURI(relayMonitor, pathRegisterValidator)
log = log.WithField("url", url)
_, err := SendHTTPRequest(context.Background(), m.httpClientRegVal, http.MethodPost, url, UserAgent(""), payload, nil)
_, err := SendHTTPRequest(context.Background(), m.httpClientRegVal, http.MethodPost, url, "", payload, nil)
if err != nil {
log.WithError(err).Warn("error calling registerValidator on relay monitor")
return
Expand Down

0 comments on commit 025acf0

Please sign in to comment.