Skip to content

Commit a356b32

Browse files
authored
chore: fix some comments (#116)
Signed-off-by: riskrose <[email protected]>
1 parent cd34efb commit a356b32

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pkg/statebased/statebasedimpl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (s *stateEP) ListOrgs() []string {
8787
func (s *stateEP) setMSPIDsFromSP(sp *common.SignaturePolicyEnvelope) error {
8888
// iterate over the identities in this envelope
8989
for _, identity := range sp.Identities {
90-
// this imlementation only supports the ROLE type
90+
// this implementation only supports the ROLE type
9191
if identity.PrincipalClassification == msp.MSPPrincipal_ROLE {
9292
msprole := &msp.MSPRole{}
9393
err := proto.Unmarshal(identity.Principal, msprole)

shim/internal/client_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ func TestMessageSizes(t *testing.T) {
7878
regClient, err := NewRegisterClient(client)
7979
assert.NoError(t, err, "failed to create register client")
8080

81-
t.Run("acceptable messaages", func(t *testing.T) {
81+
t.Run("acceptable messages", func(t *testing.T) {
8282
acceptableMessage := &peer.ChaincodeMessage{
8383
Payload: make([]byte, maxSendMessageSize-100),
8484
}
8585
sendMessages <- acceptableMessage
8686
err = regClient.Send(acceptableMessage)
87-
assert.NoError(t, err, "sending messge below size threshold failed")
87+
assert.NoError(t, err, "sending message below size threshold failed")
8888

8989
select {
9090
case m := <-receivedMessages:
@@ -103,7 +103,7 @@ func TestMessageSizes(t *testing.T) {
103103
Payload: make([]byte, maxSendMessageSize+1),
104104
}
105105
err = regClient.Send(&peer.ChaincodeMessage{})
106-
assert.NoError(t, err, "sending messge below size threshold should succeed")
106+
assert.NoError(t, err, "sending message below size threshold should succeed")
107107

108108
select {
109109
case m := <-receivedMessages:
@@ -121,7 +121,7 @@ func TestMessageSizes(t *testing.T) {
121121
Payload: make([]byte, maxSendMessageSize+1),
122122
}
123123
err = regClient.Send(tooBig)
124-
assert.Error(t, err, "sending messge above size threshold should fail")
124+
assert.Error(t, err, "sending message above size threshold should fail")
125125
})
126126

127127
err = lis.Close()

shim/stub.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func newChaincodeStub(handler *Handler, channelID, txid string, input *peer.Chai
100100
}
101101
stub.creator = shdr.GetCreator()
102102

103-
// extract trasient data from proposal payload
103+
// extract transient data from proposal payload
104104
payload := &peer.ChaincodeProposalPayload{}
105105
if err := proto.Unmarshal(stub.proposal.GetPayload(), payload); err != nil {
106106
return nil, fmt.Errorf("failed to extract proposal payload: %s", err)
@@ -493,7 +493,7 @@ func validateCompositeKeyAttribute(str string) error {
493493

494494
// To ensure that simple keys do not go into composite key namespace,
495495
// we validate simplekey to check whether the key starts with 0x00 (which
496-
// is the namespace for compositeKey). This helps in avoding simple/composite
496+
// is the namespace for compositeKey). This helps in avoiding simple/composite
497497
// key collisions.
498498
func validateSimpleKeys(simpleKeys ...string) error {
499499
for _, key := range simpleKeys {

0 commit comments

Comments
 (0)