Search code examples
node.jshyperledger-fabrichyperledger-chaincode

Debug my already instanitated nodejs chaincode


I have developed Node.js chaincode in dev mode by following these three steps

  1. peer chaincode install -n {} -v {} -p {} -l node
  2. peer chaincode instantiate -n {} -v {} -c {} -o {} -C mychannel
  3. peer chaincode invoke -n {} -v {} -o {} -c{}

Now each time when i want to edit my Node.js chaincode i have to follow these steps again and again which take so much of time

  1. peer chaincode install -n {} -v {} -p {} -l node
  2. peer chaincode **upgrade** -l node -n {} -v {} -c {}
  3. peer chaincode invoke -n {} -v {} -o {} -c{}

Is there any shorter way to do debug my node.js chaincode? So that there will be no need to upgrade it every time for minor changes. Any help will be appreciated.


Solution

  • That is the immutable property of Blockchain, where you can not modify your action. The only way to save time is to carefully test the chaincodes before deploying it to the network.