Hyperledger Fabric altering fabcar example

后端 未结 1 1711
南方客
南方客 2021-01-06 03:40

I\'ve been working through the fabcar example and have it running it perfectly when no alterations have happened. What I\'m trying to do is update the fabcar.go code to add

相关标签:
1条回答
  • 2021-01-06 04:01

    I would suggest two possible approaches:

    1. Install chaincode with new name or incremented version

    Same name, but updated version:

    peer chaincode install -n fabcar -v 2.0 -p github.com/fabcar
    

    or same version, but new name:

    peer chaincode install -n tickets -v 1.0 -p github.com/fabcar
    
    1. Cleanup old chaincode container and install updated version of alternated chaincode over again.

    You can use following command to remove old chaincode container image:

    docker images | grep fabcar | awk '{print $2}' | docker rmi
    
    0 讨论(0)
提交回复
热议问题