Closed suibinz closed 2 years ago
Maybe I am not fully understand "Peer chaincode"(this returns null) vs. "peer lifecycle chaincode"(this can find the chaincode)
listing chaincode is not related with peer lifecycle
command.
here is an example for listing chaincodes. before executing peer command, check again your environment variables. https://hyperledger-fabric.readthedocs.io/en/latest/commands/peerchaincode.html#peer-chaincode-list-example
If I interpret the command reference doc correctly, "peer chaincode" is for ver 1.x, while "peer lifecycle chaincode" is for v 2.x. Since I am running v2.3, I assume that is why I should use "peer lifecycle chaincode" - which works as expected.
you can test easily if you use a cli
container.
using: 1) ./network.sh up 2) ./network.sh createChannel 3) ./network.sh deployCC ....
Chaincode is working properly by invoking functions ( addasset, query, etc.). But chaincode list return empty peer chaincode list --instantiated -C mychannel Get instantiated chaincodes on channel mychannel: