Skip to content

Commit

Permalink
chore(spelling): fix all stray typos across comments and tests (celes…
Browse files Browse the repository at this point in the history
…tiaorg#3142)

<!--
Thank you for submitting a pull request!

Please make sure you have reviewed our contributors guide before
submitting your
first PR.

Please ensure you've addressed or included references to any related
issues.

Tips:
- Use keywords like "closes" or "fixes" followed by an issue number to
automatically close related issues when the PR is merged (e.g., "closes
#123" or "fixes #123").
- Describe the changes made in the PR.
- Ensure the PR has one of the required tags (kind:fix, kind:misc,
kind:break!, kind:refactor, kind:feat, kind:deps, kind:docs, kind:ci,
kind:chore, kind:testing)

-->

Used a tool to find stray spellings then fix them, hopefully this will
prevent future small PRs for little fixes emerging and we can encourage
more significant / valuable PRs from external contributors
  • Loading branch information
ramin committed Jan 29, 2024
1 parent 9484e15 commit 1bae060
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libs/pidstore/pidstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestPutLoad(t *testing.T) {

ds := sync.MutexWrap(datastore.NewMapDatastore())

t.Run("unitialized-pidstore", func(t *testing.T) {
t.Run("uninitialized-pidstore", func(t *testing.T) {
testPutLoad(ctx, ds, t)
})
t.Run("initialized-pidstore", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/p2p/cmd/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ var connectednessCmd = &cobra.Command{

var natStatusCmd = &cobra.Command{
Use: "nat-status",
Short: "Gets the currrent NAT status",
Short: "Gets the current NAT status",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
client, err := cmdnode.ParseClientFromCtx(cmd.Context())
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/tests/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestGetByHeight(t *testing.T) {
require.ErrorContains(t, err, "given height is from the future")
}

// TestBlobRPC ensures that blobs can be submited via rpc
// TestBlobRPC ensures that blobs can be submitted via rpc
func TestBlobRPC(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout)
t.Cleanup(cancel)
Expand Down
4 changes: 2 additions & 2 deletions nodebuilder/tests/swamp/swamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (

var blackholeIP6 = net.ParseIP("100::")

// DefaultTestTimeout should be used as the default timout on all the Swamp tests.
// DefaultTestTimeout should be used as the default timeout on all the Swamp tests.
// It's generously set to 5 minutes to give enough time for CI.
const DefaultTestTimeout = time.Minute * 5

Expand Down Expand Up @@ -331,7 +331,7 @@ func (s *Swamp) Disconnect(t *testing.T, peerA, peerB *nodebuilder.Node) {
// SetBootstrapper sets the given bootstrappers as the "bootstrappers" for the
// Swamp test suite. Every new full or light node created on the suite afterwards
// will automatically add the suite's bootstrappers as trusted peers to their config.
// NOTE: Bridge nodes do not automaatically add the bootstrappers as trusted peers.
// NOTE: Bridge nodes do not automatically add the bootstrappers as trusted peers.
// NOTE: Use `NewNodeWithStore` to avoid this automatic configuration.
func (s *Swamp) SetBootstrapper(t *testing.T, bootstrappers ...*nodebuilder.Node) {
for _, trusted := range bootstrappers {
Expand Down
4 changes: 2 additions & 2 deletions share/getters/shrex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ func TestShrexGetter(t *testing.T) {
t.Cleanup(cancel)

// generate test data
eds, dah, maxNamesapce := generateTestEDS(t)
eds, dah, maxNamespace := generateTestEDS(t)
eh := headertest.RandExtendedHeaderWithRoot(t, dah)
require.NoError(t, edsStore.Put(ctx, dah.Hash(), eds))
peerManager.Validate(ctx, srvHost.ID(), shrexsub.Notification{
DataHash: dah.Hash(),
Height: 1,
})

namespace, err := addToNamespace(maxNamesapce, 1)
namespace, err := addToNamespace(maxNamespace, 1)
require.NoError(t, err)
// check for namespace to be not in root
require.Len(t, ipld.FilterRootByNamespace(dah, namespace), 0)
Expand Down
8 changes: 4 additions & 4 deletions share/ipld/corrupted_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestNamespaceHasher_CorruptedData(t *testing.T) {
t.Cleanup(cancel)
net := availability_test.NewTestDAGNet(ctx, t)

requestor := full.Node(net)
requester := full.Node(net)
provider, mockBS := availability_test.MockNode(t, net)
provider.Availability = full.TestAvailability(t, getters.NewIPLDGetter(provider.BlockService))
net.ConnectAll()
Expand All @@ -37,15 +37,15 @@ func TestNamespaceHasher_CorruptedData(t *testing.T) {
eh := headertest.RandExtendedHeaderWithRoot(t, root)
getCtx, cancelGet := context.WithTimeout(ctx, sharesAvailableTimeout)
t.Cleanup(cancelGet)
err := requestor.SharesAvailable(getCtx, eh)
err := requester.SharesAvailable(getCtx, eh)
require.NoError(t, err)

// clear the storage of the requester so that it must retrieve again, then start attacking
// we reinitialize the node to clear the eds store
requestor = full.Node(net)
requester = full.Node(net)
mockBS.Attacking = true
getCtx, cancelGet = context.WithTimeout(ctx, sharesAvailableTimeout)
t.Cleanup(cancelGet)
err = requestor.SharesAvailable(getCtx, eh)
err = requester.SharesAvailable(getCtx, eh)
require.ErrorIs(t, err, share.ErrNotAvailable)
}
2 changes: 1 addition & 1 deletion share/p2p/peers/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (m *Manager) subscribeHeader(ctx context.Context, headerSub libhead.Subscri
log.Debugw("stored initial height", "height", h.Height())
}

// update storeFrom if header heigh
// update storeFrom if header height
m.storeFrom.Store(uint64(max(0, int(h.Height())-storedPoolsAmount)))
log.Debugw("updated lowest stored height", "height", h.Height())
}
Expand Down
2 changes: 1 addition & 1 deletion state/core_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (ca *CoreAccessor) constructSignedTx(
}

// SubmitPayForBlob builds, signs, and synchronously submits a MsgPayForBlob. It blocks until the
// transaction is committed and returns the TxReponse. If gasLim is set to 0, the method will
// transaction is committed and returns the TxResponse. If gasLim is set to 0, the method will
// automatically estimate the gas limit. If the fee is negative, the method will use the nodes min
// gas price multiplied by the gas limit.
func (ca *CoreAccessor) SubmitPayForBlob(
Expand Down

0 comments on commit 1bae060

Please sign in to comment.