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(spelling): fix all stray typos across comments and tests #3142

Merged
merged 2 commits into from
Jan 29, 2024
Merged
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
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
Loading