我和我的团队正在使用 Bluemix Blockchain 服务开发一个应用程序,在 1.0 更新之前我们一直在使用该应用程序。我们认为这可能是与 ibm-blockchain.js 库相关的错误,但是我们尝试通过 REST 部署它,但仍然出现错误:
{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Deployment failure",
"data": "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error: 'exit status 2'\n# github.com/ibm-blockchain/learn-chaincode/finished\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:38: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:52: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:67: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:80: undefined: shim.ChaincodeStubInterface\n/go/_usercode_/493306176/src/github.com/ibm-blockchain/learn-chaincode/finished/chaincode_finished.go:99: undefined: shim.ChaincodeStubInterface\n"
},
"id": 1
}
我们的服务仍在使用 0.5 版本。我们也把本地版本更新到了1.0,也试过了,看看报错是不是一样,好像是这样:
12:16:55.666 [devops] getChaincodeBytes -> ERRO 034 Error getting chaincode package bytes: Error getting code 'go get' failed with error: "exit status 1"
package github.com/VitorSousaCode/chaincodes/tree/master/final: cannot find package "github.com/VitorSousaCode/chaincodes/tree/master/final" in any of:
/opt/go/src/github.com/VitorSousaCode/chaincodes/tree/master/final (from $GOROOT)
/opt/gopath/_usercode_/796234422/src/github.com/VitorSousaCode/chaincodes/tree/master/final (from $GOPATH)
/opt/gopath/src/github.com/VitorSousaCode/chaincodes/tree/master/final
12:16:55.671 [devops] Deploy -> ERRO 035 Error deploying chaincode spec: type:GOLANG chaincodeID:<path:"https://github.com/VitorSousaCode/chaincodes/tree/master/final" > ctorMsg:<args:"init" > secureContext:"user_type1_xxxxxxxxx"
有没有人经历过类似的事情?有人知道我们是否有任何方法可以继续使用我们之前开发的 Go 链代码而不进行重大更改?