Skip to content

Commit

Permalink
Fix several typos. (#4592)
Browse files Browse the repository at this point in the history
This PR addresses several typos within the source code.

It should not have any affect on the usage, but several code-comments are now grammatically correct.
  • Loading branch information
tsachiherman authored Sep 19, 2022
1 parent 5585714 commit 7db1e26
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion exp/support/pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (p *Pipeline) resetNode(node *PipelineNode) {
}
}

// Process starts pipeline. Return channel will return if an error occured in
// Process starts pipeline. Return channel will return if an error occurred in
// any of the processors or any of the pipeline hooks. Will return ErrShutdown
// if the pipeline was shutdown.
func (p *Pipeline) Process(reader Reader) <-chan error {
Expand Down
4 changes: 2 additions & 2 deletions handlers/federation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type ReverseSQLDriver struct {
SQLDriver

// LookupReverseRecordQuery is a SQL query used for performing "reverse"
// federation queries. This query should accomodate a single parameter, using
// federation queries. This query should accommodate a single parameter, using
// "?" as the placeholder. This provided parameter will be a strkey-encoded
// stellar account id to lookup, such as
// "GDOP3VI4UA5LS7AMLJI66RJUXEQ4HX46WUXTRTJGI5IKDLNWUBOW3FUK".
Expand All @@ -115,7 +115,7 @@ type SQLDriver struct {
Dialect string

// LookupRecordQuery is a SQL query used for performing "forward" federation
// queries. This query should accomodate one or two parameters, using "?" as
// queries. This query should accommodate one or two parameters, using "?" as
// the placeholder. This provided parameters will be a name and domain
LookupRecordQuery string

Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions/query_params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func TestSellingBuyingAssetQueryParams(t *testing.T) {
}
}

func TestSellingBuyingAssetQueryParamsWithCanonicalRepresenation(t *testing.T) {
func TestSellingBuyingAssetQueryParamsWithCanonicalRepresentation(t *testing.T) {

testCases := []struct {
desc string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ func TestClaimClaimableBalanceEffectsTestSuite(t *testing.T) {
suite.Run(t, new(ClaimClaimableBalanceEffectsTestSuite))
}

func TestTrustlineSponsorhipEffects(t *testing.T) {
func TestTrustlineSponsorshipEffects(t *testing.T) {
source := xdr.MustMuxedAddress("GAUJETIZVEP2NRYLUESJ3LS66NVCEGMON4UDCBCSBEVPIID773P2W6AY")
usdAsset := xdr.MustNewCreditAsset("USD", "GAUJETIZVEP2NRYLUESJ3LS66NVCEGMON4UDCBCSBEVPIID773P2W6AY")
poolIDStr := "19cc788419412926a11049b9fb1f87906b8f02bc6bf8f73d8fd347ede0b79fa5"
Expand Down
2 changes: 1 addition & 1 deletion strkey/decode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func TestDecode(t *testing.T) {

for _, kase := range cases {
payload, err := Decode(kase.ExpectedVersionByte, kase.Address)
if assert.NoError(t, err, "An error occured decoding case %s", kase.Name) {
if assert.NoError(t, err, "An error occurred decoding case %s", kase.Name) {
assert.Equal(t, kase.ExpectedPayload, payload, "Output mismatch in case %s", kase.Name)
}
}
Expand Down
2 changes: 1 addition & 1 deletion strkey/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestEncode(t *testing.T) {

for _, kase := range cases {
actual, err := Encode(kase.VersionByte, kase.Payload)
if assert.NoError(t, err, "An error occured in case %s", kase.Name) {
if assert.NoError(t, err, "An error occurred in case %s", kase.Name) {
assert.Equal(t, kase.Expected, actual, "Output mismatch in case %s", kase.Name)
}
}
Expand Down
2 changes: 1 addition & 1 deletion strkey/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestVersion(t *testing.T) {

for _, kase := range cases {
actual, err := Version(kase.Address)
if assert.NoError(t, err, "An error occured decoding case %s", kase.Name) {
if assert.NoError(t, err, "An error occurred decoding case %s", kase.Name) {
assert.Equal(t, kase.ExpectedVersionByte, actual, "Output mismatch in case %s", kase.Name)
}
}
Expand Down
6 changes: 3 additions & 3 deletions toid/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestID_ToInt64(t *testing.T) {
expected int64
shouldPanic bool
}{
// accomodates 12-bits of precision for the operation field
// accommodates 12-bits of precision for the operation field
{
id: &ID{0, 0, 1},
expected: 1,
Expand All @@ -31,7 +31,7 @@ func TestID_ToInt64(t *testing.T) {
id: &ID{0, 0, 4096},
shouldPanic: true,
},
// accomodates 20-bits of precision for the transaction field
// accommodates 20-bits of precision for the transaction field
{
id: &ID{0, 1, 0},
expected: 4096,
Expand All @@ -44,7 +44,7 @@ func TestID_ToInt64(t *testing.T) {
id: &ID{0, 1048576, 0},
shouldPanic: true,
},
// accomodates 32-bits of precision for the ledger field
// accommodates 32-bits of precision for the ledger field
{
id: &ID{1, 0, 0},
expected: 4294967296,
Expand Down
2 changes: 1 addition & 1 deletion txnbuild/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func validateOffer(buying, selling Asset, offerAmount string, price xdr.Price, o

// ValidationError is a custom error struct that holds validation errors of txnbuild's operation structs.
type ValidationError struct {
Field string // Field is the struct field on which the validation error occured.
Field string // Field is the struct field on which the validation error occurred.
Message string // Message is the validation error message.
}

Expand Down
2 changes: 1 addition & 1 deletion txnbuild/revoke_sponsorship.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (r *RevokeSponsorship) FromXDR(xdrOp xdr.Operation) error {
r.SourceAccount = accountFromXDR(xdrOp.SourceAccount)
op, ok := xdrOp.Body.GetRevokeSponsorshipOp()
if !ok {
return errors.New("error parsing revoke_sponsorhip operation from xdr")
return errors.New("error parsing revoke_sponsorship operation from xdr")
}
switch op.Type {
case xdr.RevokeSponsorshipTypeRevokeSponsorshipLedgerEntry:
Expand Down
2 changes: 1 addition & 1 deletion txnbuild/timebounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Timebounds = TimeBounds

// Validate for TimeBounds sanity-checks the configured Timebound limits, and confirms the object was built
// using a factory method. This is done to ensure that default Timebound structs (which have no limits) are not
// valid - you must explicitly specifiy the Timebound you require.
// valid - you must explicitly specify the Timebound you require.
func (tb *TimeBounds) Validate() error {
if tb == nil || !tb.wasBuilt {
return errors.New("timebounds must be constructed using NewTimebounds(), NewTimeout(), or NewInfiniteTimeout()")
Expand Down
2 changes: 1 addition & 1 deletion txnbuild/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func stringsToKP(keys ...string) ([]*keypair.Full, error) {
func concatHashX(signatures []xdr.DecoratedSignature, preimage []byte) ([]xdr.DecoratedSignature, error) {
if maxSize := xdr.Signature(preimage).XDRMaxSize(); len(preimage) > maxSize {
return nil, errors.Errorf(
"preimage cannnot be more than %d bytes", maxSize,
"preimage cannot be more than %d bytes", maxSize,
)
}
extended := make(
Expand Down
2 changes: 1 addition & 1 deletion xdr/price.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/big"
)

// String returns a string represenation of `p`
// String returns a string representation of `p`
func (p Price) String() string {
return big.NewRat(int64(p.N), int64(p.D)).FloatString(7)
}
Expand Down

0 comments on commit 7db1e26

Please sign in to comment.