官术网_书友最值得收藏!

How it works...

This concludes the recipe to create and deploy your first smart contract chaincode.

In the previous steps, we used query.js to query the key-value pair store. We can also query for the values of one or more keys, or perform complex searches on JSON data-storage formats. The following diagram shows how the query works:

The following is a representation of different functions in chaincode, which explains that we should first define the code functions to all the available APIs in the chaincode interface:

The following diagram shows the process of updating the ledger. Once an update to the ledger is proposed and endorsed, it will be returned to the application, and will in turn send the updated ledger to be ordered and written to every peer's ledger:

We learned how to write a small smart contract chaincode on the Fabric network to perform a transaction data query and update. In the next chapter, you will learn how to write an end-to-end Hyperledger Fabric application using all that we have learned in this chapter.

主站蜘蛛池模板: 新泰市| 岳池县| 清河县| 宁安市| 乌审旗| 辰溪县| 东乡县| 定结县| 庐江县| 绵竹市| 买车| 东至县| 新乡市| 宝兴县| 时尚| 吕梁市| 临海市| 湟中县| 韩城市| 北碚区| 丰顺县| 云安县| 瑞金市| 孙吴县| 牙克石市| 东港市| 军事| 裕民县| 定结县| 凭祥市| 清丰县| 本溪市| 增城市| 个旧市| 左贡县| 齐河县| 多伦县| 岑巩县| 新乡市| 黄骅市| 桑植县|