Skip to content

Commit

Permalink
fix empty block handling
Browse files Browse the repository at this point in the history
Avoid BlockDoesNotExistsException on `blockchain.stream()` and `Block()`
with `only_ops=True` on blocks without ops.
Fixes holgern#149.
  • Loading branch information
crokkon committed Jan 21, 2019
1 parent dc3812d commit f00f428
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beem/block.py
Expand Up @@ -141,7 +141,9 @@ def refresh(self):
'timestamp': ops[0]["timestamp"],
'operations': ops}
else:
block = {}
block = {'block': self.identifier,
'timestamp': "1970-01-01T00:00:00",
'operations': []}
else:
if self.steem.rpc.get_use_appbase():
try:
Expand Down

0 comments on commit f00f428

Please sign in to comment.