From 997fa30d578fd9a08c40140f5a51e09abd916720 Mon Sep 17 00:00:00 2001 From: Justin Traglia <95511699+jtraglia@users.noreply.github.com> Date: Fri, 28 Jul 2023 05:56:43 -0500 Subject: [PATCH] Remove redundant type conversions (#551) --- server/service.go | 2 +- server/utils.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/service.go b/server/service.go index b39d9e08..4a9a9b2c 100644 --- a/server/service.go +++ b/server/service.go @@ -219,7 +219,7 @@ func (m *BoostService) sendValidatorRegistrationsToRelayMonitors(payload []apiv1 go func(relayMonitor *url.URL) { url := GetURI(relayMonitor, pathRegisterValidator) log = log.WithField("url", url) - _, err := SendHTTPRequest(context.Background(), m.httpClientRegVal, http.MethodPost, url, UserAgent(""), nil, payload, nil) + _, err := SendHTTPRequest(context.Background(), m.httpClientRegVal, http.MethodPost, url, "", nil, payload, nil) if err != nil { log.WithError(err).Warn("error calling registerValidator on relay monitor") return diff --git a/server/utils.go b/server/utils.go index 667ec5bd..3c0648be 100644 --- a/server/utils.go +++ b/server/utils.go @@ -244,17 +244,17 @@ func executionPayloadToBlockHeader(payload *capella.ExecutionPayload) (*types.He ParentHash: common.Hash(payload.ParentHash), UncleHash: types.EmptyUncleHash, Coinbase: common.Address(payload.FeeRecipient), - Root: common.Hash(payload.StateRoot), + Root: payload.StateRoot, TxHash: types.DeriveSha(types.Transactions(transactionData), trie.NewStackTrie(nil)), - ReceiptHash: common.Hash(payload.ReceiptsRoot), - Bloom: types.Bloom(payload.LogsBloom), + ReceiptHash: payload.ReceiptsRoot, + Bloom: payload.LogsBloom, Difficulty: common.Big0, Number: new(big.Int).SetUint64(payload.BlockNumber), GasLimit: payload.GasLimit, GasUsed: payload.GasUsed, Time: payload.Timestamp, Extra: payload.ExtraData, - MixDigest: common.Hash(payload.PrevRandao), + MixDigest: payload.PrevRandao, BaseFee: baseFeePerGas, WithdrawalsHash: &withdrawalsHash, }, nil