【发布时间】:2019-08-21 02:21:06
【问题描述】:
我有链码,它应该加密数据并放入分类帐并进行查询。
我已经更新了结构二进制文件,但在其他结构示例链代码中,这一行是相同的并且没有任何错误。
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)
}
错误指向
queryPatient(APIstub shim.ChaincodeStubInterface, args []string) sc.Response { .
【问题讨论】:
-
这段代码的语法没有错,所以它不会产生那个错误。错误来自其他地方或实际代码不同。
标签: go hyperledger-fabric hyperledger-chaincode chaincode