示例#1
0
 def info(self):
     r = ResponseInfo()
     r.data = "counter"
     r.version = "1.0"
     r.last_block_height = 0
     r.last_block_app_hash = b''
     return r
示例#2
0
 def info(self, req) -> ResponseInfo:
     """
     Since this will always respond with height=0, Tendermint
     will resync this app from the begining
     """
     r = ResponseInfo()
     r.version = "1.0"
     r.last_block_height = 0
     r.last_block_app_hash = b''
     return r
示例#3
0
    def info(self, req):
        # Load state
        if not self._storage:
            state, _ = setup_app_state(self.rootdir)
            self._storage = Storage(state)

        result = ResponseInfo()
        result.last_block_height = self._storage.state.last_block_height
        result.last_block_app_hash = self._storage.state.last_block_hash
        result.data = "pyTendermint app v{}".format(self.version)
        result.version = self.version
        return result
示例#4
0
 def info(self, req) -> ResponseInfo:
     r = ResponseInfo()
     r.version = "1.0"
     r.last_block_height = 0
     r.last_block_app_hash = b''
     return r