Skip to content

Commit

Permalink
chore: fix struct field name and some typos in comment (#5104)
Browse files Browse the repository at this point in the history
Signed-off-by: piguagua <[email protected]>
  • Loading branch information
piguagua authored Jan 15, 2025
1 parent 713f8c7 commit a4b9db2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion common/ledger/snapshot/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func TestFileCreatorErrorPropagation(t *testing.T) {
func TestFileReaderErrorPropagation(t *testing.T) {
testPath := t.TempDir()

// non-existent-file cuases an error
// non-existent-file causes an error
nonExistentFile := path.Join(testPath, "non-existent-file")
_, err := OpenFile(nonExistentFile, byte(1))
require.Contains(t, err.Error(), "error while opening the snapshot file: "+nonExistentFile)
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/benchmark/chainmgmt/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (m *chainsMgr) createOrOpenChains() []*Chain {
}

default:
panic(fmt.Errorf("unknown chain init opeartion"))
panic(fmt.Errorf("unknown chain init operation"))
}
return m.chains()
}
Expand Down
6 changes: 3 additions & 3 deletions core/ledger/kvledger/benchmark/chainmgmt/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const (
ChainInitOpOpen
)

// TestEnv is a high level struct that the experiments are expeted to use as a starting point.
// TestEnv is a high level struct that the experiments are expected to use as a starting point.
// See one of the Benchmark tests for the intended usage
type TestEnv struct {
mgr *chainsMgr
}

// InitTestEnv initialize TestEnv with given configurations. The initialization cuases
// creation (or openning of existing) chains and the block creation and commit go routines
// InitTestEnv initialize TestEnv with given configurations. The initialization causes
// creation (or opening of existing) chains and the block creation and commit go routines
// for each of the chains. For configurations options, see comments on specific configuration type
func InitTestEnv(mgrConf *ChainMgrConf, batchConf *BatchConf, initOperation chainInitOp) *TestEnv {
mgr := newChainsMgr(mgrConf, batchConf, initOperation)
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/kvledger/tests/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (c *client) addPostOrderTx(txid string, customTxType common.HeaderType) *tx
return txAndPvtdata
}

// simulateDeployTx mimics a transction that deploys a chaincode. This in turn calls the function 'simulateDataTx'
// simulateDeployTx mimics a transaction that deploys a chaincode. This in turn calls the function 'simulateDataTx'
// with supplying the simulation logic that mimics the invoke function of 'lscc' for the ledger tests
func (c *client) simulateDeployTx(ccName string, collConfs []*collConf) *txAndPvtdata {
ccData := &ccprovider.ChaincodeData{Name: ccName}
Expand Down
2 changes: 1 addition & 1 deletion core/ledger/ledger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ type QueryExecutor interface {
// 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.
// ExecuteQueryOnPrivateData executes the given query and returns an iterator that contains results of type specific to the underlying data store.
// Only used for state databases that support query
// For a chaincode, the namespace corresponds to the chaincodeId
// The returned ResultsIterator contains results of type *KV which is defined in fabric-protos/ledger/queryresult.
Expand Down
2 changes: 1 addition & 1 deletion msp/msp.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type OUIdentifier struct {
// CertifiersIdentifier is the hash of certificates chain of trust
// related to this organizational unit
CertifiersIdentifier []byte
// OrganizationUnitIdentifier defines the organizational unit under the
// OrganizationalUnitIdentifier defines the organizational unit under the
// MSP identified with MSPIdentifier
OrganizationalUnitIdentifier string
}
Expand Down

0 comments on commit a4b9db2

Please sign in to comment.