Skip to content

Commit

Permalink
switch to json encoding instead of ssz for block publishing v2
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Jan 16, 2024
1 parent 2f16414 commit eb97dc3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions beaconclient/prod_beacon_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,8 @@ func (c *ProdBeaconInstance) PublishBlock(block *common.VersionedSignedProposal,
uri = fmt.Sprintf("%s/eth/v1/beacon/blocks", c.beaconURI)
return fetchBeacon(http.MethodPost, uri, block, nil, nil, headers, false)
} else {
blockSSZ, err := block.MarshalSSZ()
if err != nil {
return 0, fmt.Errorf("could not marshal block to SSZ: %w", err)
}
uri = fmt.Sprintf("%s/eth/v2/beacon/blocks?broadcast_validation=%s", c.beaconURI, broadcastMode.String())
return fetchBeacon(http.MethodPost, uri, blockSSZ, nil, nil, headers, true)
return fetchBeacon(http.MethodPost, uri, block, nil, nil, headers, false)
}
}

Expand Down

0 comments on commit eb97dc3

Please sign in to comment.