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

chore: fix some wrong words among in the code #14189

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions api/client/beacon/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func DownloadFinalizedData(ctx context.Context, client *Client) (*OriginData, er

s, err := vu.UnmarshalBeaconState(sb)
if err != nil {
return nil, errors.Wrap(err, "error unmarshaling finalized state to correct version")
return nil, errors.Wrap(err, "error unmarshalling finalized state to correct version")
}

slot := s.LatestBlockHeader().Slot
Expand Down Expand Up @@ -263,7 +263,7 @@ func getWeakSubjectivityEpochFromHead(ctx context.Context, client *Client) (prim
log.Printf("detected supported config in remote head state, name=%s, fork=%s", vu.Config.ConfigName, version.String(vu.Fork))
headState, err := vu.UnmarshalBeaconState(headBytes)
if err != nil {
return 0, errors.Wrap(err, "error unmarshaling state to correct version")
return 0, errors.Wrap(err, "error unmarshalling state to correct version")
}

epoch, err := helpers.LatestWeakSubjectivityEpoch(ctx, headState, vu.Config)
Expand Down
4 changes: 2 additions & 2 deletions api/client/beacon/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (c *Client) GetForkSchedule(ctx context.Context) (forks.OrderedSchedule, er
}
ofs, err := fsr.OrderedForkSchedule()
if err != nil {
return nil, errors.Wrap(err, fmt.Sprintf("problem unmarshaling %s response", getForkSchedulePath))
return nil, errors.Wrap(err, fmt.Sprintf("problem unmarshalling %s response", getForkSchedulePath))
}
return ofs, nil
}
Expand Down Expand Up @@ -223,7 +223,7 @@ func (c *Client) GetNodeVersion(ctx context.Context) (*NodeVersion, error) {
}{}
err = json.Unmarshal(b, &d)
if err != nil {
return nil, errors.Wrapf(err, "error unmarshaling response body: %s", string(b))
return nil, errors.Wrapf(err, "error unmarshalling response body: %s", string(b))
}
return parseNodeVersion(d.Data.Version)
}
Expand Down
12 changes: 6 additions & 6 deletions api/client/builder/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ func (c *Client) GetHeader(ctx context.Context, slot primitives.Slot, parentHash
}
v := &VersionResponse{}
if err := json.Unmarshal(hb, v); err != nil {
return nil, errors.Wrapf(err, "error unmarshaling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
return nil, errors.Wrapf(err, "error unmarshalling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
}
switch strings.ToLower(v.Version) {
case strings.ToLower(version.String(version.Deneb)):
hr := &ExecHeaderResponseDeneb{}
if err := json.Unmarshal(hb, hr); err != nil {
return nil, errors.Wrapf(err, "error unmarshaling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
return nil, errors.Wrapf(err, "error unmarshalling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
}
p, err := hr.ToProto()
if err != nil {
Expand All @@ -232,7 +232,7 @@ func (c *Client) GetHeader(ctx context.Context, slot primitives.Slot, parentHash
case strings.ToLower(version.String(version.Capella)):
hr := &ExecHeaderResponseCapella{}
if err := json.Unmarshal(hb, hr); err != nil {
return nil, errors.Wrapf(err, "error unmarshaling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
return nil, errors.Wrapf(err, "error unmarshalling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
}
p, err := hr.ToProto()
if err != nil {
Expand All @@ -242,7 +242,7 @@ func (c *Client) GetHeader(ctx context.Context, slot primitives.Slot, parentHash
case strings.ToLower(version.String(version.Bellatrix)):
hr := &ExecHeaderResponse{}
if err := json.Unmarshal(hb, hr); err != nil {
return nil, errors.Wrapf(err, "error unmarshaling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
return nil, errors.Wrapf(err, "error unmarshalling the builder GetHeader response, using slot=%d, parentHash=%#x, pubkey=%#x", slot, parentHash, pubkey)
}
p, err := hr.ToProto()
if err != nil {
Expand Down Expand Up @@ -312,10 +312,10 @@ func (c *Client) SubmitBlindedBlock(ctx context.Context, sb interfaces.ReadOnlyS
return nil, nil, errors.Wrap(err, "error posting the blinded block to the builder api")
}
// ExecutionPayloadResponse parses just the outer container and the Value key, enabling it to use the .Value
// key to determine which underlying data type to use to finish the unmarshaling.
// key to determine which underlying data type to use to finish the unmarshalling.
ep := &ExecutionPayloadResponse{}
if err := json.Unmarshal(rb, ep); err != nil {
return nil, nil, errors.Wrap(err, "error unmarshaling the builder ExecutionPayloadResponse")
return nil, nil, errors.Wrap(err, "error unmarshalling the builder ExecutionPayloadResponse")
}
if strings.ToLower(ep.Version) != version.String(sb.Version()) {
return nil, nil, errors.Wrapf(errResponseVersionMismatch, "req=%s, recv=%s", strings.ToLower(ep.Version), version.String(sb.Version()))
Expand Down
2 changes: 1 addition & 1 deletion api/client/builder/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ type ExecPayloadResponseCapella struct {
Data ExecutionPayloadCapella `json:"data"`
}

// ExecutionPayloadResponse allows for unmarshaling just the Version field of the payload.
// ExecutionPayloadResponse allows for unmarshalling just the Version field of the payload.
// This allows it to return different ExecutionPayload types based on the version field.
type ExecutionPayloadResponse struct {
Version string `json:"version"`
Expand Down
2 changes: 1 addition & 1 deletion consensus-types/blocks/get_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"google.golang.org/protobuf/proto"
)

// GetPayloadResponse represents the result of unmarshaling an execution engine
// GetPayloadResponse represents the result of unmarshalling an execution engine
// GetPayloadResponseV(1|2|3|4) value.
type GetPayloadResponse struct {
ExecutionData interfaces.ExecutionData
Expand Down
2 changes: 1 addition & 1 deletion encoding/ssz/detect/configfork.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var beaconStateCurrentVersion = fieldSpec{
}

// FromState exploits the fixed-size lower-order bytes in a BeaconState as a heuristic to obtain the value of the
// state.version field without first unmarshaling the BeaconState. The Version is then internally used to lookup
// state.version field without first unmarshalling the BeaconState. The Version is then internally used to lookup
// the correct ConfigVersion.
func FromState(marshaled []byte) (*VersionedUnmarshaler, error) {
cv, err := beaconStateCurrentVersion.bytes4(marshaled)
Expand Down