Go编译错误:无法使用新(SimpleChaincode)
在从IBM Bluemix文档编译“DemoChainCode”应用程序时,我不断遇到以下错误:Go编译错误:无法使用新(SimpleChaincode),go,hyperledger-fabric,Go,Hyperledger Fabric,在从IBM Bluemix文档编译“DemoChainCode”应用程序时,我不断遇到以下错误: \Asgn5.go:28:无法使用new(SimpleChaincode)(type*SimpleChaincode)作为类型s him.Chaincode参数中的shim.Start: *SimpleChaincode未实现shim.Chaincode(Initmethod的类型错误) have Init(shim.ChaincodeStubInterface,字符串,[]字符串)([]字节,错误
\Asgn5.go:28:无法使用new(SimpleChaincode)(type*SimpleChaincode)作为类型s him.Chaincode参数中的shim.Start:
*SimpleChaincode未实现shim.Chaincode(Initmethod的类型错误)
have Init(shim.ChaincodeStubInterface,字符串,[]字符串)([]字节,错误)
想要初始化(shim.ChaincodeStubInterface)([]字节,错误)
这里可能出了什么问题?我认为hyperledger人员的指导应该有帮助: 问题是hyperledger的版本互不兼容
我认为(!)对于Bluemix,您将需要v0.5请提供更多信息(代码)。如果
SimpleChaincode
是自定义结构实现`Init(shim.ChaincodeStubInterface)([]字节,错误)`function谢谢DazWilkin。我将检查我的结构版本,然后重试。