Skip to content

Commit

Permalink
Remove redundant type conversions (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored Jul 28, 2023
1 parent 0a6e929 commit 997fa30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions server/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 997fa30

Please sign in to comment.