Skip to content

Commit 72c5197

Browse files
committed
[FAB-16882]fix some typo error
This is fix #16882 Change-Id: Ida45ded935afdb5fde4096ba08cfadc59048dcbc Signed-off-by: bjzhang03 <bjzhang1991@gmail.com>
1 parent 1772f2d commit 72c5197

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

internal/peer/chaincode/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func getChaincodeDeploymentSpec(spec *pb.ChaincodeSpec, crtPkg bool) (*pb.Chainc
6868
return &pb.ChaincodeDeploymentSpec{ChaincodeSpec: spec, CodePackage: codePackageBytes}, nil
6969
}
7070

71-
// getChaincodeSpec get chaincode spec from the cli cmd pramameters
71+
// getChaincodeSpec get chaincode spec from the cli cmd parameters
7272
func getChaincodeSpec(cmd *cobra.Command) (*pb.ChaincodeSpec, error) {
7373
spec := &pb.ChaincodeSpec{}
7474
if err := checkChaincodeCmdParams(cmd); err != nil {
@@ -408,7 +408,7 @@ func InitCmdFactory(cmdName string, isEndorserRequired, isOrdererRequired bool,
408408
}
409409
certificate, err := common.GetCertificateFnc()
410410
if err != nil {
411-
return nil, errors.WithMessage(err, "error getting client cerificate")
411+
return nil, errors.WithMessage(err, "error getting client certificate")
412412
}
413413

414414
signer, err := common.GetDefaultSignerFnc()

msp/mspimpl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ func (msp *bccspmsp) deserializeIdentityInternal(serializedIdentity []byte) (Ide
424424
return newIdentity(cert, pub, msp)
425425
}
426426

427-
// SatisfiesPrincipal returns null if the identity matches the principal or an error otherwise
427+
// SatisfiesPrincipal returns nil if the identity matches the principal or an error otherwise
428428
func (msp *bccspmsp) SatisfiesPrincipal(id Identity, principal *m.MSPPrincipal) error {
429429
principals, err := collectPrincipals(principal, msp.GetVersion())
430430
if err != nil {

msp/mspimplsetup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (msp *bccspmsp) setupCAs(conf *m.FabricMSPConfig) error {
150150
msp.intermediateCerts[i] = id
151151
}
152152

153-
// root CA and intermediate CA certificates are sanitized, they can be reimported
153+
// root CA and intermediate CA certificates are sanitized, they can be re-imported
154154
msp.opts = &x509.VerifyOptions{Roots: x509.NewCertPool(), Intermediates: x509.NewCertPool()}
155155
for _, id := range msp.rootCerts {
156156
msp.opts.Roots.AddCert(id.(*identity).cert)

orderer/common/cluster/comm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (c *Comm) DispatchConsensus(ctx context.Context, request *orderer.Consensus
131131
return c.H.OnConsensus(reqCtx.channel, reqCtx.sender, request)
132132
}
133133

134-
// classifyRequest identifies the sender and channel of the request and returns
134+
// requestContext identifies the sender and channel of the request and returns
135135
// it wrapped in a requestContext
136136
func (c *Comm) requestContext(ctx context.Context, msg proto.Message) (*requestContext, error) {
137137
channel := c.ChanExt.TargetChannel(msg)

orderer/common/cluster/rpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const (
6464
SubmitOperation
6565
)
6666

67-
// Consensus passes the given ConsensusRequest message to the raft.Node instance.
67+
// SendConsensus passes the given ConsensusRequest message to the raft.Node instance.
6868
func (s *RPC) SendConsensus(destination uint64, msg *orderer.ConsensusRequest) error {
6969
if s.Logger.IsEnabledFor(zapcore.DebugLevel) {
7070
defer s.consensusSent(time.Now(), destination, msg)
@@ -127,7 +127,7 @@ func (s *RPC) consensusSent(start time.Time, to uint64, msg *orderer.ConsensusRe
127127
s.Logger.Debugf("Sending msg of %d bytes to %d on channel %s took %v", len(msg.Payload), to, s.Channel, time.Since(start))
128128
}
129129

130-
// getProposeStream obtains a Submit stream for the given destination node
130+
// getOrCreateStream obtains a Submit stream for the given destination node
131131
func (s *RPC) getOrCreateStream(destination uint64, operationType OperationType) (orderer.Cluster_StepClient, error) {
132132
stream := s.getStream(destination, operationType)
133133
if stream != nil {

orderer/consensus/consensus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ type ConsenterSupport interface {
113113
// WriteConfigBlock commits a block to the ledger, and applies the config update inside.
114114
WriteConfigBlock(block *cb.Block, encodedMetadataValue []byte)
115115

116-
// Sequence returns the current config squence.
116+
// Sequence returns the current config sequence.
117117
Sequence() uint64
118118

119119
// ChannelID returns the channel ID this support is associated with.

orderer/consensus/kafka/chain.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (chain *chainImpl) Halt() {
156156
select {
157157
case <-chain.haltChan:
158158
// This construct is useful because it allows Halt() to be called
159-
// multiple times (by a single thread) w/o panicking. Recal that a
159+
// multiple times (by a single thread) w/o panicking. Recall that a
160160
// receive from a closed channel returns (the zero value) immediately.
161161
logger.Warningf("[channel: %s] Halting of chain requested again", chain.ChannelID())
162162
default:
@@ -817,7 +817,7 @@ func (chain *chainImpl) processRegular(regularMessage *ab.KafkaMessageRegular, r
817817
// Any messages coming in here may or may not have been re-validated
818818
// and re-ordered, BUT they are definitely valid here
819819

820-
// advance lastOriginalOffsetProcessed iff message is re-validated and re-ordered
820+
// advance lastOriginalOffsetProcessed if message is re-validated and re-ordered
821821
offset := regularMessage.OriginalOffset
822822
if offset == 0 {
823823
offset = chain.lastOriginalOffsetProcessed
@@ -851,7 +851,7 @@ func (chain *chainImpl) processRegular(regularMessage *ab.KafkaMessageRegular, r
851851
}
852852

853853
// Somebody resubmitted message at offset X, whereas we didn't. This is due to non-determinism where
854-
// that message was considered invalid by us during revalidation, however somebody else deemed it to
854+
// that message was considered invalid by us during re-validation, however somebody else deemed it to
855855
// be valid, and resubmitted it. We need to advance lastResubmittedConfigOffset in this case in order
856856
// to enforce consistency across the network.
857857
if chain.lastResubmittedConfigOffset < regularMessage.OriginalOffset {
@@ -883,7 +883,7 @@ func (chain *chainImpl) processRegular(regularMessage *ab.KafkaMessageRegular, r
883883
// Any messages coming in here may or may not have been re-validated
884884
// and re-ordered, BUT they are definitely valid here
885885

886-
// advance lastOriginalOffsetProcessed iff message is re-validated and re-ordered
886+
// advance lastOriginalOffsetProcessed if message is re-validated and re-ordered
887887
offset := regularMessage.OriginalOffset
888888
if offset == 0 {
889889
offset = chain.lastOriginalOffsetProcessed
@@ -933,7 +933,7 @@ func (chain *chainImpl) WriteBlock(block *cb.Block, metadata *ab.KafkaMetadata)
933933
chain.consenter.Metrics().LastOffsetPersisted.With("channel", chain.ChannelID()).Set(float64(metadata.LastOffsetPersisted))
934934
}
935935

936-
// WriteBlock acts as a wrapper around the consenter support WriteConfigBlock, encoding the metadata,
936+
// WriteConfigBlock acts as a wrapper around the consenter support WriteConfigBlock, encoding the metadata,
937937
// and updating the metrics.
938938
func (chain *chainImpl) WriteConfigBlock(block *cb.Block, metadata *ab.KafkaMetadata) {
939939
chain.ConsenterSupport.WriteConfigBlock(block, protoutil.MarshalOrPanic(metadata))

orderer/consensus/kafka/consenter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (consenter *consenterImpl) HandleChain(support consensus.ConsenterSupport,
8282

8383
// commonConsenter allows us to retrieve the configuration options set on the
8484
// consenter object. These will be common across all chain objects derived by
85-
// this consenter. They are set using using local configuration settings. This
85+
// this consenter. They are set using local configuration settings. This
8686
// interface is satisfied by consenterImpl.
8787
type commonConsenter interface {
8888
brokerConfig() *sarama.Config

0 commit comments

Comments
 (0)