HyperLedger fabric chaincode not updated

后端 未结 4 1486
青春惊慌失措
青春惊慌失措 2021-01-15 16:19

I am trying to follow along this sample Hyperledger Fabric code: https://github.com/hyperledger/education/tree/master/LFS171x/fabric-material

Initially I replaced ch

4条回答
  •  醉酒成梦
    2021-01-15 16:45

    when developing chaincode on hyperledger fabric.

    1: we have to remove chaincode docker image for testing each change. For Example: name of install chaincode is mycc

    #remove container
    docker rm -f $(docker ps -aq)
    #remove images
    docker rmi mycc-0-container id or name
    

    2: you can install chaincode just by changing its name like mycc is currently running then you have to change mycc1 and now you need to use mycc1 and perform your transactions. For Example:

    #Already install chaincode has named mycc
    #following command will install same chaincode(updated) with chaincodeName
    #mycc1
    docker exec cli peer chaincode install -n mycc1 -v 0 -p github.com/sacc
    

    Note: now you need to instantiate , invoke and query chaincode with name mycc1.

提交回复
热议问题