Skip to content
Snippets Groups Projects
Commit f00f428d authored by crokkon's avatar crokkon
Browse files

fix empty block handling

Avoid BlockDoesNotExistsException on `blockchain.stream()` and `Block()`
with `only_ops=True` on blocks without ops.
Fixes #149.
parent dc3812d0
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,9 @@ class Block(BlockchainObject): ...@@ -141,7 +141,9 @@ class Block(BlockchainObject):
'timestamp': ops[0]["timestamp"], 'timestamp': ops[0]["timestamp"],
'operations': ops} 'operations': ops}
else: else:
block = {} block = {'block': self.identifier,
'timestamp': "1970-01-01T00:00:00",
'operations': []}
else: else:
if self.steem.rpc.get_use_appbase(): if self.steem.rpc.get_use_appbase():
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment