0

I am running Docker Toolbox on Windows. I have downloaded fabric samples from https://github.com/hyperledger/fabric-samples. Modified the fabcar chaincode.

The first time I ran ./startFabric.sh to bring up the local blokchain network, the chaincode is getting picked up well and fine.

Now I make further changes to fabcar chaincode. But this time, my latest chaincode changes are not being picked up by the blockchain network. I still see old log messages and responses.

I have tried the following options already: 1) clearing up docker containers 2) restarting docker toolbox. 3) rerunning ./startFabric.sh from scratch.

The only time my chaincode changes are picked up is the "first ever time" when i use that particular chaincode. Thereafter the first chaincode somehow resides in the memory forever.

Please let me know what I am doing wrong.

Thanks!

nihal
  • 357
  • 1
  • 3
  • 18

2 Answers2

0

After changing chaincode in fabric-samples/chaincode/fabcar/go/fabcar.go (this is where you change the chaincode, I presume), you have to go build fabcar.go so that latest compiled code gets into the peer.

cbairy
  • 1
  • 2
0

./startFabric.sh add a new docker image and use it as chaincode container. To run updated chaincode, remove this container and execute ./startFabric.sh again.

docker rmi -f dev-peer0.org1.example.com-docchain-1.0-961b279a2d42ac81dd6585a11d9fad6bfe4f000a2c3d0cdc9be4bd1ecdf5610d
Asad Hayat
  • 368
  • 2
  • 20