Skip to content

Commit

Permalink
Merge "Fix typo in comment and error messages"
Browse files Browse the repository at this point in the history
  • Loading branch information
christo4ferris authored and Gerrit Code Review committed May 6, 2017
2 parents 3d169cc + e0d907b commit 290ddc9
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
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
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
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
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
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
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
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 290ddc9

Please sign in to comment.