dpepbjp126917 2017-07-24 03:59
浏览 173
已采纳

如何在Hyperledger Fabric V0.6 Chaincode实现中查询一段时间的状态

I am using the Hyperledger fabric V0.6 service in IBM-bluemix and deployed my go language chaincode to the peer as provided in the bluemix documentation. Since I am very new to this implementation, I could find only the PutState and GetState methods there in ChaincodeStubInterface.
But my requirement is to query the states for a period of time.
eg:
11-Feb-2017 10:00:00 : created Asset1
11-Feb-2017 12:00:00 : created Asset2
12-Feb-2017 10:00:00 : Modified Asset1
13-Feb-2017 13:00:00 : Created Asset3
....
15-Feb-2017 14:00:00 : Created AssetN

Now I want to query the states for the range 12-Feb-2017 00:00:00 to current timestamp. I have gone through lots of documentations but I didn't find any solution for this.

How can I get this data? Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dongmeng1875 2017-07-24 10:18
    关注

    The v0.6 implementation of Hyperledger Fabric does not include such function. The Hyperledger community recently published v1.0.0 of Hyperledger Fabric, which will also soon be available on IBM Bluemix that increases the capabilities of chaincode and the ledger. However, it does not to my knowledge provide a means of querying the ledger within a range of dates. It does provide a means of iterating over a range of blocks given a starting and ending keys.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部