我正在Bluemix上運行一個簡單的Hyperledger網絡,我可以部署和調用,但不能查詢鏈接代碼函數Init爲VAR,「ABC」 ...... stub.PutState("abc", []byte(strconv.Itoa(Aval)))
Bluemix上的Hyperledger:無法啓動chaincode規範(無法獲取部署事務
我應該能夠查詢「ABC」作爲驗證的代碼就可以使用相反,我看到了這個錯誤:
"... Error:Failed to launch chaincode spec(Could not get deployment transaction for - LedgerError - ResourceNotFound: ledger: resource not found)"
查詢JSON是:
{
"jsonrpc": "2.0",
"method": "query",
"params": {
"type": 1,
"chaincodeID": {
"name": "my chaincode id"
},
"ctorMsg": {
"function": "read",
"args": [
"abc"
]
},
"secureContext": "user_type1_3"
},
"id": 0
}
謝謝 - 我剛剛刪除了服務,重新創建了它,並重新部署了代碼。這次我確保了它的部署。我想知道當我第一次部署時是否發起了這個問題,因爲當我點擊它的按鈕時,我幾次點擊「嘗試」按鈕。再次感謝! – guyho
如果你發現這個答案有用,你可以upvote它http://stackoverflow.com/help/why-vote – cjcroix