def _get_blocks(self, blocks: Union[List[int], Set[int]]):
""" Fetch multiple blocks from steemd at once.
Warning:
This method does not ensure that all blocks are returned, or that the results are ordered.
You will probably want to use `steemd.get_blocks()` instead.
Args:
blocks (list): A list, or a set of block numbers.
Returns:
A generator with results.
"""
results = self.exec_multi_with_futures('get_block', blocks, max_workers=10)
return ({**x, 'block_num': int(x['block_id'][:8], base=16)} for x in results if x)
评论列表
文章目录