Integrate get block with transaction id api (#2021)

* Integrate api, get block with transaction id

* Fixed docs and docstrings

* Fix docs

* Remove status from tendermint, fix mongo query
This commit is contained in:
Vanshdeep Singh
2018-02-08 19:02:21 +05:30
committed by vrde
parent a7ed8cf4cb
commit fa33fc26af
7 changed files with 111 additions and 21 deletions

View File

@@ -251,7 +251,14 @@ def main():
ctx['block'] = pretty_json(block_dict)
ctx['blockid'] = block.height
block = Block(transactions=[tx], node_pubkey=node_public, voters=[node_public], signature=signature)
# block status
block_list = [
block.height
]
ctx['block_list'] = pretty_json(block_list)
# block = Block(transactions=[tx], node_pubkey=node_public, voters=[node_public], signature=signature)
block_transfer = Block(transactions=[tx_transfer], node_pubkey=node_public,
voters=[node_public], signature=signature)
ctx['block_transfer'] = pretty_json(block_transfer.to_dict())
@@ -263,13 +270,6 @@ def main():
vote = b.vote(vblock.id, DUMMY_SHA3, True)
ctx['vote'] = pretty_json(vote)
# block status
block_list = [
block_transfer.id,
block.id
]
ctx['block_list'] = pretty_json(block_list)
base_path = os.path.join(os.path.dirname(__file__),
'source/http-samples')
if not os.path.exists(base_path):