I have the chaincode, which should encrypt data and put to ledger and do query.
I have updated fabric binaries, but in other fabric samples chaincodes this line is the same and do not have any errors.
func (s *SmartContract) queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response {
if len(args) != 1 {
return shim.Error("Incorrect number of arguments. Expecting 1")
}
patientAsBytes, err := fc.Decrypter(APIstub, args[0])
if err != nil {
return shim.Error(err.Error())
}
return shim.Success(patientAsBytes)
}
Error is directing to the
queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response { .