我可以從以下官方路徑運(yùn)行鏈代碼: https ://github.com/ibm-blockchain/learn-chaincode/finished github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02# peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'但無(wú)法從我自己的 github 路徑運(yùn)行 chainncode: https ://github.com/jeffyxia/hyperledger/trade# peer chaincode deploy -p https://github.com/jeffyxia/hyperledger/trade -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'錯(cuò)誤信息是:錯(cuò)誤:構(gòu)建鏈代碼時(shí)出錯(cuò):rpc 錯(cuò)誤:代碼 = 2 desc = 獲取錯(cuò)誤chaincode package bytes: Error getting code 'go get' failed with error: "exit status 2"# github.com/jeffyxia/hyperledger/hello_world/go/_usercode_/519629987/src/github.com/jeffyxia/hyperledger/hello_world/chaincode_example01.go:31: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start: *SimpleChaincode does not implement shim.Chaincode (wrong type for Init method) have Init(*shim.ChaincodeStub, string, []string) ([]byte, error) want Init(shim.ChaincodeStubInterface, string, []string) ([]byte, error)補(bǔ)充資料:Ubuntu 16.04 沒(méi)有g(shù)o語(yǔ)言環(huán)境,使用PBFT算法。如何解決這個(gè)問(wèn)題,謝謝。
無(wú)法在 Ubuntu 終端上從我自己的 github 運(yùn)行超級(jí)賬本鏈代碼
BIG陽(yáng)
2022-04-20 17:29:03