简体   繁体   中英

How can I use two chaincodes installed in the same Fabric channel?

I have two chaincodes deployed in the same channel of 5 peers. The first chaincode is installed on 3 peers, the second one is installed on other 2 peers. The first chaincode inits the ledger with some data, while the second one should query the ledger to take one of the elements stored in the ledger during the initialization. It seems that the ledger associated to the second smart contract is empty. From theory, I know that there is one ledger associated with the channel, but here it seems one ledger associated with the chaincode. Where am I wrong? Thank you in advance!

I figured out by studying the concept of namespaces and world states.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM