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
• 26,740 points
769 views

1 answer to this question.

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,350 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 11, 2018 in Blockchain by Perry
738 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 18, 2018 in Blockchain by sapan
879 views
0 votes
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,400 points
4,768 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,215 views
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,350 points
1,027 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP