Skip to content

Commit

Permalink
chore: fix some typos in comments
Browse files Browse the repository at this point in the history
Signed-off-by: goodfirm <fanyishang@yeah.net>

chore: fix some typos in comments

Signed-off-by: goodfirm <fanyishang@yeah.net>
  • Loading branch information
goodfirm authored and satota2 committed Apr 15, 2024
1 parent c79400d commit 32c87e9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/committer/committer.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Committer interface {
// CommitPvtDataOfOldBlocks commits the private data corresponding to already committed block
// If hashes for some of the private data supplied in this function does not match
// the corresponding hash present in the block, the unmatched private data is not
// committed and instead the mismatch inforation is returned back
// committed and instead the mismatch information is returned back
CommitPvtDataOfOldBlocks(reconciledPvtdata []*ledger.ReconciledPvtdata, unreconciled ledger.MissingPvtDataInfo) ([]*ledger.PvtdataHashMismatch, error)

// GetMissingPvtDataTracker return the MissingPvtDataTracker
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/kv_ledger_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestLedgerMetataDataUnmarshalError(t *testing.T) {
_, err := provider.CreateFromGenesisBlock(genesisBlock)
require.NoError(t, err)

// put invalid bytes for the metatdata key
// put invalid bytes for the metadata key
require.NoError(t, provider.idStore.db.Put(metadataKey(ledgerID), []byte("invalid"), true))

_, err = provider.List()
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/pause_resume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestPauseAndResumeErrors(t *testing.T) {
genesisBlock, _ := configtxtest.MakeGenesisBlock(ledgerID)
_, err := provider.CreateFromGenesisBlock(genesisBlock)
require.NoError(t, err)
// purposely set an invalid metatdata
// purposely set an invalid metadata
require.NoError(t, provider.idStore.db.Put(metadataKey(ledgerID), []byte("invalid"), true))

// fail if provider is open (e.g., peer is up running)
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/state_listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestStateListener(t *testing.T) {
require.NoError(t, sim2.SetState(namespace, "key3", []byte("value3")))
sim2.Done()

// Simulate tx3 - this neighter conflicts with tx1 nor with tx2
// Simulate tx3 - this neither conflicts with tx1 nor with tx2
sim3, err := lgr.NewTxSimulator("test_tx_3")
require.NoError(t, err)
require.NoError(t, sim3.SetState(namespace, "key4", []byte("value4")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (provider *VersionedDBProvider) Drop(dbName string) error {
}
}
if err := dropDB(provider.couchInstance, metadataDBName); err != nil {
logger.Errorw("Error dropping metatdataDB", "channel", dbName, "error", err)
logger.Errorw("Error dropping metadataDB", "channel", dbName, "error", err)
return err
}

Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/unjoin_channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestUnjoinChannelWithInvalidMetadataErrors(t *testing.T) {
_, err := provider.CreateFromGenesisBlock(genesisBlock)
require.NoError(t, err)

// purposely set an invalid metatdata
// purposely set an invalid metadata
require.NoError(t, provider.idStore.db.Put(metadataKey(ledgerID), []byte("invalid"), true))
provider.Close()

Expand Down
4 changes: 2 additions & 2 deletions core/ledger/ledger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ type PeerLedger interface {
// CommitPvtDataOfOldBlocks commits the private data corresponding to already committed block
// If hashes for some of the private data supplied in this function does not match
// the corresponding hash present in the block, the unmatched private data is not
// committed and instead the mismatch inforation is returned back
// committed and instead the mismatch information is returned back
CommitPvtDataOfOldBlocks(reconciledPvtdata []*ReconciledPvtdata, unreconciled MissingPvtDataInfo) ([]*PvtdataHashMismatch, error)
// GetMissingPvtDataTracker return the MissingPvtDataTracker
GetMissingPvtDataTracker() (MissingPvtDataTracker, error)
Expand Down Expand Up @@ -283,7 +283,7 @@ type QueryExecutor interface {
// GetPrivateDataRangeScanIterator returns an iterator that contains all the key-values between given key ranges.
// startKey is included in the results and endKey is excluded. An empty startKey refers to the first available key
// and an empty endKey refers to the last available key. For scanning all the keys, both the startKey and the endKey
// can be supplied as empty strings. However, a full scan shuold be used judiciously for performance reasons.
// can be supplied as empty strings. However, a full scan should be used judiciously for performance reasons.
// The returned ResultsIterator contains results of type *KV which is defined in fabric-protos/ledger/queryresult.
GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error)
// ExecuteQuery executes the given query and returns an iterator that contains results of type specific to the underlying data store.
Expand Down

0 comments on commit 32c87e9

Please sign in to comment.