dpepbjp126917 2017-07-24 11: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 18: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.

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

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大