@@ -83,7 +83,7 @@ type PayloadAttributes struct {
8383}
8484
8585func (c * ProdBeaconInstance ) SubscribeToHeadEvents (slotC chan HeadEventData ) {
86- eventsURL := fmt . Sprintf ( "%s /eth/v1/events?topics=head", c . beaconURI )
86+ eventsURL := c . beaconURI + " /eth/v1/events?topics=head"
8787 log := c .log .WithField ("url" , eventsURL )
8888 log .Info ("subscribing to head events" )
8989
@@ -109,7 +109,7 @@ func (c *ProdBeaconInstance) SubscribeToHeadEvents(slotC chan HeadEventData) {
109109}
110110
111111func (c * ProdBeaconInstance ) SubscribeToPayloadAttributesEvents (payloadAttributesC chan PayloadAttributesEvent ) {
112- eventsURL := fmt . Sprintf ( "%s /eth/v1/events?topics=payload_attributes", c . beaconURI )
112+ eventsURL := c . beaconURI + " /eth/v1/events?topics=payload_attributes"
113113 log := c .log .WithField ("url" , eventsURL )
114114 log .Info ("subscribing to payload_attributes events" )
115115
@@ -235,7 +235,7 @@ type GetHeaderResponseMessage struct {
235235
236236// GetHeader returns the latest header - https://ethereum.github.io/beacon-APIs/#/Beacon/getBlockHeader
237237func (c * ProdBeaconInstance ) GetHeader () (* GetHeaderResponse , error ) {
238- uri := fmt . Sprintf ( "%s /eth/v1/beacon/headers/head", c . beaconURI )
238+ uri := c . beaconURI + " /eth/v1/beacon/headers/head"
239239 resp := new (GetHeaderResponse )
240240 _ , err := fetchBeacon (http .MethodGet , uri , nil , resp , nil , http.Header {}, false )
241241 return resp , err
@@ -260,7 +260,7 @@ func (c *ProdBeaconInstance) GetPublishURI() string {
260260func (c * ProdBeaconInstance ) PublishBlock (block * common.VersionedSignedProposal , broadcastMode BroadcastMode ) (code int , err error ) {
261261 var uri string
262262 if c .ffUseV1PublishBlockEndpoint {
263- uri = fmt . Sprintf ( "%s /eth/v1/beacon/blocks", c . beaconPublishURI )
263+ uri = c . beaconPublishURI + " /eth/v1/beacon/blocks"
264264 } else {
265265 uri = fmt .Sprintf ("%s/eth/v2/beacon/blocks?broadcast_validation=%s" , c .beaconPublishURI , broadcastMode )
266266 }
@@ -311,7 +311,7 @@ type GetGenesisResponseData struct {
311311
312312// GetGenesis returns the genesis info - https://ethereum.github.io/beacon-APIs/#/Beacon/getGenesis
313313func (c * ProdBeaconInstance ) GetGenesis () (* GetGenesisResponse , error ) {
314- uri := fmt . Sprintf ( "%s /eth/v1/beacon/genesis", c . beaconURI )
314+ uri := c . beaconURI + " /eth/v1/beacon/genesis"
315315 resp := new (GetGenesisResponse )
316316 _ , err := fetchBeacon (http .MethodGet , uri , nil , resp , nil , http.Header {}, false )
317317 return resp , err
@@ -328,7 +328,7 @@ type GetSpecResponse struct {
328328
329329// GetSpec - https://ethereum.github.io/beacon-APIs/#/Config/getSpec
330330func (c * ProdBeaconInstance ) GetSpec () (spec * GetSpecResponse , err error ) {
331- uri := fmt . Sprintf ( "%s /eth/v1/config/spec", c . beaconURI )
331+ uri := c . beaconURI + " /eth/v1/config/spec"
332332 resp := new (GetSpecResponse )
333333 _ , err = fetchBeacon (http .MethodGet , uri , nil , resp , nil , http.Header {}, false )
334334 return resp , err
@@ -344,7 +344,7 @@ type GetForkScheduleResponse struct {
344344
345345// GetForkSchedule - https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule
346346func (c * ProdBeaconInstance ) GetForkSchedule () (spec * GetForkScheduleResponse , err error ) {
347- uri := fmt . Sprintf ( "%s /eth/v1/config/fork_schedule", c . beaconURI )
347+ uri := c . beaconURI + " /eth/v1/config/fork_schedule"
348348 resp := new (GetForkScheduleResponse )
349349 _ , err = fetchBeacon (http .MethodGet , uri , nil , resp , nil , http.Header {}, false )
350350 return resp , err
0 commit comments