You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
blockchain.stream(start, stop, only_ops=True) should return all operations, including virtual ops, contained in the block range from start to stop. The same should be possible via Block(blocknum, only_ops=True) for individual blocks. If a block does not contain operations, the calls should return an empty list.
Actual behavior
blockchain.stream(start, stop, only_ops=True) and Block(blocknum, only_ops=True) fail with a BlockDoesNotExistsException if the block contains no operations.
Traceback (most recent call last):
File "bug_get_ops_in_block.py", line 8, in <module>
b = Block(1000, only_ops=True)
File "/usr/local/lib/python3.6/site-packages/beem/block.py", line 76, in __init__
steem_instance=steem_instance
File "/usr/local/lib/python3.6/site-packages/beem/blockchainobject.py", line 134, in __init__
self.refresh()
File "/usr/local/lib/python3.6/site-packages/beem/block.py", line 156, in refresh
raise BlockDoesNotExistsException("output: %s of identifier %s" % (str(block), str(self.identifier)))
beem.exceptions.BlockDoesNotExistsException: output: {} of identifier 1000
Expected behavior
blockchain.stream(start, stop, only_ops=True)
should return all operations, including virtual ops, contained in the block range fromstart
tostop
. The same should be possible viaBlock(blocknum, only_ops=True)
for individual blocks. If a block does not contain operations, the calls should return an empty list.Actual behavior
blockchain.stream(start, stop, only_ops=True)
andBlock(blocknum, only_ops=True)
fail with aBlockDoesNotExistsException
if the block contains no operations.How to reproduce
or
Output:
Environment
The text was updated successfully, but these errors were encountered: