3
我正在使用Hyperledger來處理POC。我已經設置鏈碼設置爲here。我遵循鏈接中提到的選項1(使用vagrant運行CA服務器和一個VP)。在我目前的設置中,我在禁用安全的情況下運行。我的VP被罰款運行,並且我能夠啓動並註冊chaincode就好了(按照提到here但是,當我試圖通過CLI使用以下命令來部署我chaincode:Hyperledger自定義Chaincode部署錯誤
peer chaincode deploy -n mycc -c '{"Function":"init", "Args": `["hi there"]}'`
我收到以下錯誤
Error: Error building chaincode: rpc error: code = 2 desc = "Error getting chaincode package bytes: Cannot generate hashcode from empty chaincode path"
我試着特別提到了在那裏我已經存儲在我的自定義chaincode的路徑,我得到以下錯誤:
Error: Error building chaincode: rpc error: code = 2 desc = "Path to chaincode does not exist: /opt/gopath/src/ProductBC/ProductBC/finished/"
有沒有人遇到類似的問題,或者有什麼可以解決這個問題的方法?
所以,我的GOPATH是'/ opt/gopath /',我的chaincode駐留在'/ src'目錄中。所以,我試着用下面的命令: 「peer chaincode deploy -p/src/ProductBC/ProductBC/finished -n mycc -c'{」Function「:」init「,」Args「:'[」hi there「] }''「,它現在不會拋出任何錯誤,但似乎卡住了。用新狀態更新問題。 – tortuga
'src'沒有必要。你能不能嘗試運行這個命令? (剛剛更新了答案中的示例) –
通過重新啓動對等點,您意味着通過'make peer'再次構建對等點,或者僅通過'peer node start'命令重新啓動對等點? – tortuga