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

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.

主站蜘蛛池模板: 瑞昌市| 高淳县| 蒲城县| 乌恰县| 临夏市| 抚州市| 九江市| 兴海县| 菏泽市| 永昌县| 青浦区| 贵港市| 西城区| 纳雍县| 蕲春县| 延安市| 赤城县| 洮南市| 中江县| 滦平县| 商都县| 宣城市| 兴仁县| 同仁县| 泸水县| 湖南省| 游戏| 涞水县| 德化县| 闸北区| 枣强县| 通榆县| 平利县| 泽库县| 来宾市| 乌海市| 察隅县| 永城市| 武汉市| 普兰店市| 宁陵县|