Skip to content

Commit

Permalink
chore: Optimize many comments including structure names and typos
Browse files Browse the repository at this point in the history
Signed-off-by: writegr <wellweek@outlook.com>
  • Loading branch information
writegr authored and denyeart committed Apr 18, 2024
1 parent 559a3dc commit ce49b61
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/common/ccprovider/cdspackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (ccpack *CDSPackage) InitFromBuffer(buf []byte) (*ChaincodeData, error) {
return ccpack.GetChaincodeData(), nil
}

// InitFromFS returns the chaincode and its package from the file system
// InitFromPath returns the chaincode and its package from the file system
func (ccpack *CDSPackage) InitFromPath(ccNameVersion string, path string) ([]byte, *pb.ChaincodeDeploymentSpec, error) {
buf, err := GetChaincodePackageFromPath(ccNameVersion, path)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion core/common/validation/statebased/vpmanagerimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (m *KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey(cc
return policy, nil
}

// SetTxValidationCode implements the method of the same name of
// SetTxValidationResult implements the method of the same name of
// the KeyLevelValidationParameterManager interface. Note that
// this function receives a namespace argument so that it records
// the validation result for this transaction and for this chaincode.
Expand Down
2 changes: 1 addition & 1 deletion core/endorser/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (s *SupportImpl) IsSysCC(name string) bool {
return s.BuiltinSCCs.IsSysCC(name)
}

// ExecuteInit a deployment proposal and return the chaincode response
// ExecuteLegacyInit a deployment proposal and return the chaincode response
func (s *SupportImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, name, version string, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error) {
return s.ChaincodeSupport.ExecuteLegacyInit(txParams, name, version, input)
}
Expand Down
4 changes: 2 additions & 2 deletions core/ledger/confighistory/mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ func (m *Mgr) HandleStateUpdates(trigger *ledger.StateUpdateTrigger) error {
return dbHandle.writeBatch(batch, true)
}

// ImportConfigHistory imports the collection config history associated with a given
// ImportFromSnapshot imports the collection config history associated with a given
// ledgerID from the snapshot files present in the dir
func (m *Mgr) ImportFromSnapshot(ledgerID string, dir string) error {
exist, _, err := fileutil.FileExists(filepath.Join(dir, snapshotDataFileName))
if err != nil {
return err
}
if !exist {
// when the ledger being bootstapped never had a private data collection for
// when the ledger being bootstrapped never had a private data collection for
// any chaincode, the snapshot files associated with the confighistory store
// will not be present in the snapshot directory. Hence, we can return early
return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/comm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type ClientConfig struct {
MaxSendMsgSize int
}

// Convert the ClientConfig to the approriate set of grpc.DialOptions.
// Convert the ClientConfig to the appropriate set of grpc.DialOptions.
func (cc ClientConfig) DialOptions() ([]grpc.DialOption, error) {
var dialOpts []grpc.DialOption
dialOpts = append(dialOpts, grpc.WithKeepaliveParams(keepalive.ClientParameters{
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/comm/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ func TestVerifyCertificateCallback(t *testing.T) {
})
}

// prior tests used self-signed certficates loaded by the GRPCServer and the test client
// prior tests used self-signed certificates loaded by the GRPCServer and the test client
// here we'll use certificates signed by certificate authorities
func TestWithSignedRootCertificates(t *testing.T) {
t.Parallel()
Expand Down

0 comments on commit ce49b61

Please sign in to comment.