chainHero / heroes-service

Short tutorial to build a blockchain application in Go with Hyperledger Fabric
https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/
Apache License 2.0
275 stars 147 forks source link

Chaincode ID problem #21

Closed RogerHsiehNCNCCU closed 5 years ago

RogerHsiehNCNCCU commented 6 years ago

The chaincode ID is heroes-service. When I use the ID, I can install chaincode successful. When I invoke some data to blockchain, It can be successful with the ID. But when I use other chaincode ID, some ID can install successful , some not. And I can't invoke successful with other chaincode ID. I got did NOT receive CC event for eventId error.

Why should I only use heroes-service chaincode ID?

Thanks!

sshmaxime commented 6 years ago

Are you still having this issue @a037580238 ?

RogerHsiehNCNCCU commented 6 years ago

Yes, when I use heroes-service, it's ok. But other chaincode ID will have the problem.

did NOT receive CC event for eventId error

my environment: ubuntu 16.04 LTS go version go1.9.1 linux/amd64

antitoine commented 6 years ago

Hi @a037580238 , When you install and instantiate a chaincode, a docker container is built on your computer. If you try to install another chaincode, another docker container is built, except if it already exist. So maybe, you don't clean up images correctly. Check the Makefile, this line remove the heroes-service chaincode docker image:

docker rmi `docker images --no-trunc | grep "heroes-service" | cut -d ' ' -f 1` 2>/dev/null || true