What if I change Chaincode state in invokeChaincode?

0 votes
I have two chaincodes. I want to know what will happen if i change the chaincode state of one chaincode using the invokeChaincode() method from another chaincode and then calling putState() method.. Will this cause any race condition? What the best way to achieve this?
Jul 13, 2018 in Blockchain by digger
• 27,620 points
89 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

The chaincode state is not changed when you invoke a chaincode.. 
You can follow the below steps to achieve this:

  1. Client sends transaction proposal to the peer
  2. Peer simulates transaction sign the results and put them into signed transaction proposal
  3. Client has to repeat step #2 based on expected endorsement policies
  4. Once client collected enough endorsements he send them to the ordering service
  5. Ordering service cuts the block and order all transaction
  6. Block delivered to the peers
  7. Peer validates and eventually commits the block
answered Jul 13, 2018 by slayer
• 29,040 points

Related Questions In Blockchain

+1 vote
1 answer

How do i change the names of validating peers in IBM Bluemix blockchain?

IBM Bluemix Blockchain service Hyperledger Fabric v0.6 will ...READ MORE

answered Apr 10, 2018 in Blockchain by Perry
59 views
+1 vote
2 answers

Can I include real world data in a smart contract? If so, how?

You cant access/embed real world data using ...READ MORE

answered Jul 17, 2018 in Blockchain by sapan
33 views
+1 vote
1 answer

What is the difference between if() and require() statement in solidity??

If() and require() have separate functions and ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,330 points
223 views
0 votes
1 answer
0 votes
1 answer

Updating data of struct to save in chaincode.

You can use a code similar to ...READ MORE

answered Jul 5, 2018 in Blockchain by slayer
• 29,040 points
86 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.