Skip to content

Commit

Permalink
Fix typo in comment and error messages
Browse files Browse the repository at this point in the history
Change-Id: Ic5ec4f9cb4cfbb37af898f307e2d96008fe52742
Signed-off-by: Nao Nishijima <Nao.nishijima@hal.hitachi.com>
  • Loading branch information
Nao Nishijima authored and Nao Nishijima committed May 4, 2017
1 parent ef6df86 commit e0d907b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bccsp/pkcs11/aes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func TestCBCPKCS7Encrypt_EmptyPlaintext(t *testing.T) {
// As part of the padding, at least one block gets encrypted (while the first block is the IV)
const expectedLength = aes.BlockSize + aes.BlockSize
if len(ciphertext) != expectedLength {
t.Fatalf("Wrong ciphertext length. Expected %d, recieved %d", expectedLength, len(ciphertext))
t.Fatalf("Wrong ciphertext length. Expected %d, received %d", expectedLength, len(ciphertext))
}

t.Log("Ciphertext length: ", len(ciphertext))
Expand Down
2 changes: 1 addition & 1 deletion bccsp/sw/aes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func TestCBCPKCS7Encrypt_EmptyPlaintext(t *testing.T) {
// As part of the padding, at least one block gets encrypted (while the first block is the IV)
const expectedLength = aes.BlockSize + aes.BlockSize
if len(ciphertext) != expectedLength {
t.Fatalf("Wrong ciphertext length. Expected %d, recieved %d", expectedLength, len(ciphertext))
t.Fatalf("Wrong ciphertext length. Expected %d, received %d", expectedLength, len(ciphertext))
}

t.Log("Ciphertext length: ", len(ciphertext))
Expand Down
4 changes: 2 additions & 2 deletions bddtests/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func (b *BDDContext) beforeScenario(scenarioOrScenarioOutline interface{}) {
b.scenarioOrScenarioOutline = scenarioOrScenarioOutline
//switch t := scenarioOrScenarioOutline.(type) {
//case *gherkin.Scenario:
// fmt.Printf("Scenario recieved %v", t)
// fmt.Printf("Scenario received %v", t)
//case *gherkin.ScenarioOutline:
// fmt.Printf("ScenarioOutline recieved %v", t)
// fmt.Printf("ScenarioOutline received %v", t)
//}
}

Expand Down
2 changes: 1 addition & 1 deletion bddtests/context_endorser.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (b *BDDContext) userCreatesADeploymentSpecUsingChaincodeSpecAndDevopsOnPeer
func getContextAndCancelForTimeoutInSecs(parentCtx context.Context, timeoutInSecs string) (context.Context, context.CancelFunc, error) {
var err error
errRetFunc := func() error {
return fmt.Errorf("Error building context and cancel func with timout '%s': %s", timeoutInSecs, err)
return fmt.Errorf("Error building context and cancel func with timeout '%s': %s", timeoutInSecs, err)
}
var (
durationToWait time.Duration
Expand Down
10 changes: 5 additions & 5 deletions core/chaincode/shim/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func (handler *Handler) handleGetStateByRange(startKey, endKey string, txid stri
}

// Incorrect chaincode message received
chaincodeLogger.Errorf("Incorrect chaincode message %s recieved. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
chaincodeLogger.Errorf("Incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
return nil, errors.New("Incorrect chaincode message received")
}

Expand Down Expand Up @@ -598,7 +598,7 @@ func (handler *Handler) handleQueryStateNext(id, txid string) (*pb.QueryResponse
}

// Incorrect chaincode message received
chaincodeLogger.Errorf("Incorrect chaincode message %s recieved. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
chaincodeLogger.Errorf("Incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
return nil, errors.New("Incorrect chaincode message received")
}

Expand Down Expand Up @@ -646,7 +646,7 @@ func (handler *Handler) handleQueryStateClose(id, txid string) (*pb.QueryRespons
}

// Incorrect chaincode message received
chaincodeLogger.Errorf("Incorrect chaincode message %s recieved. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
chaincodeLogger.Errorf("Incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
return nil, errors.New("Incorrect chaincode message received")
}

Expand Down Expand Up @@ -694,7 +694,7 @@ func (handler *Handler) handleGetQueryResult(query string, txid string) (*pb.Que
}

// Incorrect chaincode message received
chaincodeLogger.Errorf("Incorrect chaincode message %s recieved. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
chaincodeLogger.Errorf("Incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
return nil, errors.New("Incorrect chaincode message received")
}

Expand Down Expand Up @@ -742,7 +742,7 @@ func (handler *Handler) handleGetHistoryForKey(key string, txid string) (*pb.Que
}

// Incorrect chaincode message received
chaincodeLogger.Errorf("Incorrect chaincode message %s recieved. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
chaincodeLogger.Errorf("Incorrect chaincode message %s received. Expecting %s or %s", responseMsg.Type, pb.ChaincodeMessage_RESPONSE, pb.ChaincodeMessage_ERROR)
return nil, errors.New("Incorrect chaincode message received")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ private ByteString invokeChaincodeSupport(String txId, Type messageType, ByteStr
}

// Incorrect chaincode message received
logger.error(String.format("Incorrect chaincode message %s recieved. Expecting %s or %s", response.getType(), RESPONSE, ERROR));
logger.error(String.format("Incorrect chaincode message %s received. Expecting %s or %s", response.getType(), RESPONSE, ERROR));
throw new RuntimeException("Incorrect chaincode message received");
} finally {
deleteChannel(txId);
Expand Down
2 changes: 1 addition & 1 deletion events/consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (ec *EventsClient) UnregisterAsync(ies []*ehpb.Interest) error {
return err
}

// Recv recieves next event - use when client has not called Start
// Recv receives next event - use when client has not called Start
func (ec *EventsClient) Recv() (*ehpb.Event, error) {
in, err := ec.stream.Recv()
if err == io.EOF {
Expand Down

0 comments on commit e0d907b

Please sign in to comment.