Skip to content

Commit

Permalink
Use V1 of blocks call for proposal submission.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdee committed Oct 26, 2023
1 parent cc9073d commit 3abaa55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.19.4:
- revert SubmitProposal() to use v1 of the API

0.19.0:
- major rework of API; see docs/0.19-changes.md for details

Expand Down
4 changes: 2 additions & 2 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *Service) post(ctx context.Context, endpoint string, body io.Reader) (io
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
if req.Header.Get("User-Agent") == "" {
req.Header.Set("User-Agent", "go-eth2-client/0.19.3")
req.Header.Set("User-Agent", "go-eth2-client/0.19.4")
}

resp, err := s.client.Do(req)
Expand Down Expand Up @@ -206,7 +206,7 @@ func (s *Service) post2(ctx context.Context,
req.Header.Set(k, v)
}
if req.Header.Get("User-Agent") == "" {
req.Header.Set("User-Agent", "go-eth2-client/0.19.3")
req.Header.Set("User-Agent", "go-eth2-client/0.19.4")
}

resp, err := s.client.Do(req)
Expand Down
2 changes: 1 addition & 1 deletion http/submitproposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (s *Service) SubmitProposal(ctx context.Context, proposal *api.VersionedSig

headers := make(map[string]string)
headers["Eth-Consensus-Version"] = strings.ToLower(proposal.Version.String())
_, err = s.post2(ctx, "/eth/v2/beacon/blocks", bytes.NewBuffer(specJSON), ContentTypeJSON, headers)
_, err = s.post2(ctx, "/eth/v1/beacon/blocks", bytes.NewBuffer(specJSON), ContentTypeJSON, headers)
if err != nil {
return errors.Wrap(err, "failed to submit proposal")
}
Expand Down

0 comments on commit 3abaa55

Please sign in to comment.