fabric-samples icon indicating copy to clipboard operation
fabric-samples copied to clipboard

A problem when update the contract.

Open csb123452010 opened this issue 1 year ago • 0 comments

The first image shows the deployment of the go-version basic chaincode in testnetwork. You can see that the command is "chaincode peer. add..," and the query is correct. The second image shows the deployment of the Java-version basic chaincode after the contract upgrade, and you can see that the command is "/root/chaincode jav...". At this point, there will be problems when querying all assets, as seen in image 3. But the data is still in the database, as seen in image 4.

合约升级1 合约升级2 合约升级3 合约升级4

The answer I received is:

This is probably because go-version chaincode and Java-version chaincode use different key names in Asset's JSON format.

csb123452010 avatar Jul 19 '23 08:07 csb123452010