IBM-Blockchain-Archive / ibm-blockchain-issues

Having issues with the IBM Blockchain Bluemix service? Let us know!
13 stars 12 forks source link

For IBM Blockchain on Bluemix which shim works? #57

Closed TarantulaTechnology closed 7 years ago

TarantulaTechnology commented 7 years ago

Which should be used for the currently deployed IBM Blockchain on Bluemix: 1 or 2?

  1. shim.ChaincodeStub
  2. shim.ChaincodeStubInterface

marksmacbookpro:finished markmorris$ go build ./

github.com/TarantulaTechnology/learn-chaincode/finished

./chaincode_finished.go:22: 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)

tcnt commented 7 years ago

Bluemix is still using hyperledger v0.5 which is using the first option. When you want to compile it locally make sure to use the correct hyperledger version on your local machine. See also https://github.com/IBM-Blockchain/ibm-blockchain-issues/issues/29

masterDev1985 commented 7 years ago

Thanks, @tcnt !