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

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.

主站蜘蛛池模板: 天气| 将乐县| 四平市| 洱源县| 永德县| 招远市| 灵丘县| 永清县| 通化县| 郧西县| 花垣县| 铁力市| 香河县| 通渭县| 基隆市| 云梦县| 文昌市| 治县。| 禹城市| 开平市| 繁昌县| 扬中市| 新蔡县| 望奎县| 陆良县| 华蓥市| 桑植县| 启东市| 抚顺市| 兰考县| 华亭县| 莒南县| 黄大仙区| 兰州市| 长垣县| 娄烦县| 定远县| 绥阳县| 安多县| 塔河县| 平潭县|