“通过REST-chaincodeID路径在car-lease-demo部署中获取链代码包字节时出错”

时间:2016-11-29 00:39:56

标签: github ibm-cloud blockchain hyperledger-fabric

我试图在Bluemix Services中部署car-lease-demo,但我无法在swaggerApi中找到适合chaincodeID的路径。我已使用github repo from IBM但输出此错误:

{
    "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 1\"\npackage github.com/IBM-Blockchain/car-lease-demo/Chaincode/vehicle_code: cannot find package \"github.com/IBM-Blockchain/car-lease-demo/Chaincode/vehicle_code\" in any of:\n\t/opt/go/src/github.com/IBM-Blockchain/car-lease-demo/Chaincode/vehicle_code (from $GOROOT)\n\t/opt/gopath/_usercode_/798513695/src/github.com/IBM-Blockchain/car-lease-demo/Chaincode/vehicle_code (from $GOPATH)\n\t/opt/gopath/src/github.com/IBM-Blockchain/car-lease-demo/Chaincode/vehicle_code\n"
    },
    "id": 3
}

我发现了这一点 source并检查了JSON选项卡,但开头引用的包不起作用。

在BMX中部署car-lease-demo链码的chaincodeID的正确路径是什么?

我使用的是BMX v0.6

1 个答案:

答案 0 :(得分:1)

正如在错误消息中所述,go get <chaincode path>在链代码部署期间失败。这是因为部署请求中的链代码path是错误的。此链代码的正确链代码路径为:

github.com/IBM-Blockchain/car-lease-demo/Chaincode/src/vehicle_code

也就是说,在您尝试以这种方式从Web部署链代码之前,您可以通过以下方式检查是否可以通过Web访问转链代码:

go get <public chaincode path>