Skip to content

Commit

Permalink
fix(prod_beacon_instance): USE_V1_PUBLISH_BLOCK_ENDPOINT flag
Browse files Browse the repository at this point in the history
Worked exactly the wrong way around.
  • Loading branch information
alextes committed May 1, 2024
1 parent 2cf1109 commit 6c60249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beaconclient/prod_beacon_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ func (c *ProdBeaconInstance) GetURI() string {
func (c *ProdBeaconInstance) PublishBlock(block *common.VersionedSignedProposal, broadcastMode BroadcastMode) (code int, err error) {
var uri string
if c.ffUseV1PublishBlockEndpoint {
uri = fmt.Sprintf("%s/eth/v2/beacon/blocks?broadcast_validation=%s", c.beaconURI, broadcastMode)
} else {
uri = fmt.Sprintf("%s/eth/v1/beacon/blocks", c.beaconURI)
} else {
uri = fmt.Sprintf("%s/eth/v2/beacon/blocks?broadcast_validation=%s", c.beaconURI, broadcastMode)
}
headers := http.Header{}
headers.Add("Eth-Consensus-Version", common.ForkVersionStringCapella) // optional in v1, required in v2
Expand Down

0 comments on commit 6c60249

Please sign in to comment.