Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix USE_V1_PUBLISH_BLOCK_ENDPOINT flag #582

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions beaconclient/prod_beacon_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@
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
headers.Add("Eth-Consensus-Version", strings.ToLower(block.Version.String())) // optional in v1, required in v2

Check failure on line 252 in beaconclient/prod_beacon_instance.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: strings

Check failure on line 252 in beaconclient/prod_beacon_instance.go

View workflow job for this annotation

GitHub Actions / Test

undefined: strings
return fetchBeacon(http.MethodPost, uri, block, nil, nil, headers, false)
}

Expand Down
Loading